Deuteronomy 8:2
And thou shalt remember all the way which the LORD thy God led thee these forty years in the wilderness, to humble thee, and to prove thee, to know what was in thine heart, whether thou wouldest keep his commandments, or no.
And thou shalt remember all the way which the Lord thy God led thee these forty years in the wilderness,.... For this was now the fortieth year of their coming out of Egypt into the wilderness, into which they quickly came after their departure from thence, and had been in one wilderness or another ever since, in which God went before them in a pillar of cloud and fire, and directed their way; and now they are called upon to remember all the occurrences in the way, what favours and mercies had been bestowed upon them, what provisions had been made for them, what enemies they had been delivered from or overcome, as well as what afflictions and chastisements had attended them: and so the people of God should call to mind how they were brought to see their wilderness state and condition by nature; how they were brought out of it, and stopped in their career of sin, and turned from their evil ways, and led to Christ; what gracious promises have been made to them; what light has been afforded them; what communion they have had with God; what pleasure in his ordinances; what food they have been fed with; what temptations have befallen them, and how delivered out of them; and what afflictions have been laid upon them, and how supported under them, and freed from them:
to humble thee; under the mighty hand of God, to bring down the pride of their hearts and hide it from them; to lay them low in their own eyes, and clothe them with humility, that the Lord alone might be exalted: and
to prove thee; whether they would be obedient to his laws, or how they would behave towards him both in prosperity and adversity, and to try their graces, their faith and patience, fear and love:
to know what was in thine heart; that is, to make it known to themselves and others; for God knew all that was in it, the wickedness of it, the unbelief, rebellion, and frowardness of it, and needed not any ways and means to get into the knowledge of it; see 2 Chronicles 32:31,
whether thou wouldest keep his commandments or no; which they had in such a solemn manner promised to do; Deuteronomy 5:27.