Judges 2:22-23

2:22 Joshua left those nations to test Israel. I wanted to see whether or not the people would carefully walk in the path marked out by the Lord, as their ancestors were careful to do.” 2:23 This is why the Lord permitted these nations to remain and did not conquer them immediately; he did not hand them over to Joshua.