3:179
مَّا كَانَ ٱللَّهُ لِ يَذَرَ ٱلْ مُؤْمِنِينَ عَلَىٰ مَآ أَنتُمْ عَلَيْ هِ حَتَّىٰ يَمِيزَ ٱلْ خَبِيثَ مِنَ ٱل طَّيِّبِ وَ مَا كَانَ ٱللَّهُ لِ يُطْلِعَ كُمْ عَلَى ٱلْ غَيْبِ وَ لَٰكِنَّ ٱللَّهَ يَجْتَبِى مِن رُّسُلِ هِۦ مَن يَشَآءُ فَ ـَٔامِنُ وا۟ بِ ٱللَّهِ وَ رُسُلِ هِۦ وَ إِن تُؤْمِنُ وا۟ وَ تَتَّقُ وا۟ فَ لَ كُمْ أَجْرٌ عَظِيمٌ
Allah would not leave the believers in that [state] you are in [presently] until He separates the evil from the good. Nor would Allah reveal to you the unseen. But [instead], Allah chooses of His messengers whom He wills, so believe in Allah and His messengers. And if you believe and fear Him, then for you is a great reward.
8:37
لِ يَمِيزَ ٱللَّهُ ٱلْ خَبِيثَ مِنَ ٱل طَّيِّبِ وَ يَجْعَلَ ٱلْ خَبِيثَ بَعْضَ هُۥ عَلَىٰ بَعْضٍ فَ يَرْكُمَ هُۥ جَمِيعًا فَ يَجْعَلَ هُۥ فِى جَهَنَّمَ أُو۟لَٰٓئِكَ هُمُ ٱلْ خَٰسِرُونَ
[This is] so that Allah may distinguish the wicked from the good and place the wicked some of them upon others and heap them all together and put them into Hell. It is those who are the losers.