Deuteronomy 8:2
1 You must keep carefully all these commandments I am giving you today so that you may live, increase in number, and go in and occupy the land that the Lord promised to your ancestors. 2 Remember the whole way by which he has brought you these 40 years through the wilderness so that he might, by humbling you, test you to see if you have it within you to keep his commandments or not. 3 So he humbled you by making you hungry and then feeding you with unfamiliar manna. He did this to teach you that humankind cannot live by bread alone, but also by everything that comes from the Lord’s mouth. 4 Your clothing did not wear out nor did your feet swell all these 40 years.
Sirach 2:1
Ben Sira, Ecclesiasticus1 My child, when you come to serve the Lord, prepare yourself for testing. 2 Set your heart right and be steadfast, and do not be impetuous in time of calamity. 3 Cling to him and do not depart, so that your last days may be prosperous. 4 Accept whatever befalls you, and in times of humiliation be patient. 5 For gold is tested in the fire, and those found acceptable, in the furnace of humiliation.
Notes and References
"... in Sirach 4, it is during this time when Wisdom is not recognized as Wisdom that she subjects her kin to trials and even fear and dread. This should not surprise the pious who were already told in chapter 2 that God subjects the faithful to tests but never abandons them (Sirach 2:1–6). Further, according to Deuteronomy, a key component of the wilderness journey was the testing of Israel by God to see what was in their hearts (Deuteronomy 8:2). Only when their character is sufficiently shaped to be full of wisdom does her presence all along become clear. Should they fail to pass the test and depart from her, even though they do not recognize her presence, she will abandon them to destroyers ..."
Gregory, Bradley C. "Appearance versus Reality and the Personification of Wisdom: Sirach's Place in the Early Jewish Sapiential Tradition" in Adams, Samuel L., Matthew J. Goff (ed.) Sirach and Its Contexts: The Pursuit of Wisdom and Human Flourishing (pp. 56-73) Brill, 2021