Hebrews 11:
"23 By faith Moses, when he was born, was hid three months of his parents, because they saw he was a proper child; and they were not afraid of the king's commandment.
24 By faith Moses, when he was come to years, refused to be called the son of Pharaoh's daughter;
25 Choosing rather to suffer affliction with the people of God, than to enjoy the pleasures of sin for a season;
26 Esteeming the reproach of Christ greater riches than the treasures in Egypt: for he had respect unto the recompence of the reward.
27 By faith he forsook Egypt, not fearing the wrath of the king: for he endured, as seeing him who is invisible."
....................Both acts were based upon faith in God [the Covenant-keeping God].