In The Name of Allah The Most Beneficent The Most Merciful
Ameerul Momeneen Ali Ibne Abi Talib (a.s.) says,
“Allah did not raise any Prophet- from Adam (a.s.) and all who came after him- but that He took a covenant from him that if this Prophet was alive and the Holy Prophet Muhammad (s.a.w.a.) was appointed, he should believe in and support him. And they (Prophets) were also commanded to take a similar pledge from their nation and people.”
(Tafseer-e-Tabari, v.3, p. 236; Tafseer-e-Ibn Katheer, v.1, p.378; Tafseer al-Durr al-Manthoor;
Tafseer-e-Qurtubi, v.4, p.125; Tafseer-e-Kabeer, v.8, p.155 narrating from Awaamel-e-Tahreef, v.4, p.15)
Allah the Almighty took an oath from the Prophets (a.s.) that they should inform their nations and communities of the appointment and elevated status of the Holy Prophet (s.a.) and should command them that if they survive till his advent, they should provide testimony for his prophethood.
(Tafseer-e-Tibyaan, v.2, p.513; Tafseer-e-Majmaul Bayaan, v.2, p. 468; Tafseer-e-Saafi, v.1, p.274-narrating from Awaamel-e-Tahreef, v.4, p.15)