On the eve of the Ninth of Av, in all those years that Israel were in the wilderness, a herald would go out from before Moses and announce: "Let everyone go out to dig." And each and every one went and dug a grave for himself, and would sleep in it. On the next day the herald would go out and announce: "Let the living separate from the dead," and they all arose. When they saw that they had all arisen, they were afraid, and said, "Perhaps we erred in the reckoning of the month." [They went back] and on the night of the tenth, each and every one slept in his grave. On the next day they all arose. Again they went back on the night of the eleventh, and so on the twelfth, and so on the thirteenth, and so on the fourteenth, and so on the fifteenth of Av. And when they saw that not one of them died, they knew that the decree had been annulled, and they made it a festival day. And thus the Sages taught: "There were no festival days for Israel like the Fifteenth of Av and like the Day of Atonement," etc.
Why the Fifteenth of Av Became a Festival in the Wilderness
Midrash Shmuel 32:5
ערב תשעה באב כל אותם השנים שהיו ישראל במדבר היה כרוז יוצא מלפני משה ומכריז הכל לחפור, והלך כל אחד ואחד וחפר קבר לעצמו והיה ילין בו, למחר היה הכרוז יוצא ומכריז יבדלו החיים מן המתים, ועמדו כולם, כיון שראו שעמדו כולם נתייראו ואמרו שמא תעינו בחשבון החדש [חזרו] בלילי עשירי ולנו כל אחד ואחד בקברו, למחר עמדו כולם, עוד חזרו בלילי אחד עשר, וכן בשנים עשר, וכן בשלשה עשר, וכן בארבעה עשר, וכן בחמשה עשר באב, וכיון שראו שאין אחד מהם מת, ידעו שבטלה הגזירה ועשאוהו יום טוב. וכך שנו חכמים לא היו ימים טובים לישראל כחמשה עשר באב וכיום הכפורים וכו'.