One of the most famous examples of Jewish humor in the Torah is when the Jewish people were leaving Egypt. They had the Red Sea in front of them and the mighty Egyptians behind them. At that moment the B'nei Yisrael complained " המבלי אין קברים במצרים לקחתנו למות במדבר" "Is it because there is no more room for cemetaries in Egypt that you took us out to die in the desert?"
This comment is extremely funny when you think about it, and in fact Rabbi Samson Raphael Hirsch comments that a sense of humor has always been a way the Jews survived throughout our years of exile. However, I believe that the ability to find humor in this dire situation was in fact the very means to enable a miracle to occur. For if the Jews would have been paralyzed with fright there would indeed be no hope. Only once the Jews were able to laugh at their predicament did that open the means to salvation.