Ayesha reported,

The Messenger of Allah ﷺ came in to see me while a Jewish woman was with me, and she was saying, "Are you aware that you will be tested in your graves?"Ayesha said, the Messenger of Allah ﷺ was startled and said, "It is only the Jews who will be tested."Ayesha continued, we remained like that for several nights, then the Messenger of Allah ﷺ said, "Are you aware that it has been revealed to me that you will indeed be tested in your graves?"Ayesha said, after that I heard the Messenger of Allah ﷺ seeking refuge from the torment of the grave.

Muslim 1319

Sahih

حدثنا هارون بن سعيد وحرملة بن يحيى قال هارون حدثنا وقال حرملة أخبرنا ابن وهب أخبرني يونس بن يزيد عن ابن شهاب قال حدثني عروة بن الزبير أن

عائشة قالت

دخل علي رسول الله ﷺ وعندي امرأة من اليهود وهي تقول هل شعرت أنكم تفتنون في القبور قالت فارتاع رسول الله ﷺ وقال إنما تفتن يهود قالت عائشة فلبثنا ليالي ثم قال رسول الله ﷺ هل شعرت أنه أوحي إلي أنكم تفتنون في القبور قالت عائشة فسمعت رسول الله ﷺ بعد يستعيذ من عذاب القبر

مسلم 1319صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Mosques and places of prayer
Chapter
Recommendation of seeking refuge from the torment of the grave
Numbering
Darussalam 1319
Muslim 1319