John Gill's Bible Commentary Ver. 4. And they were to prove Israel by them , etc.] They were left in the land, as to inure them to war, and try their courage, so to prove their faithfulness to God: to know whether they would hearken to the commandments, of the Lord , which he commanded their fathers by the hand of Moses ; even all the commandments of the Lord delivered to them by Moses, moral, civil, and ceremonial, and particularly those that concerned the destruction of the Canaanites, their altars, and their idols, ( Deuteronomy 7:1,5).
Matthew Henry Commentary
Verses 1-7 - As the Israelites were a type of the church on earth, they were not to be idle and slothful. The Lord was pleased to try them by the remain of the devoted nations they spared. Temptations and trials detect the wickedness of the hearts of sinners; and strengthen he graces of believers in their daily conflict with Satan, sin, and this evil world They must live in this world, but they are not of it, and are forbidde to conform to it. This marks the difference between the followers of Christ and mere professors. The friendship of the world is more fata than its enmity; the latter can only kill the body, but the forme murders many precious souls.
Original Hebrew ויהיו1961 לנסות5254 בם את853 ישׂראל3478 לדעת3045 הישׁמעו8085 את853 מצות4687 יהוה3068 אשׁר834 צוה6680 את853 אבותם1 ביד3027 משׁה׃4872