Jest run async function ONCE before all tests

I want to use jest for my server unit testing (instead of mocha+chai).
Is there a way I can run async function before all tests start (init purposes) only once and not for every test file? And also if there’s a way of running something after all tests are done?

36 thoughts on “Jest run async function ONCE before all tests”

  1. 119048 261844Today, while I was at work, my sister stole my apple ipad and tested to see if it can survive a thirty foot drop, just so she can be a youtube sensation. My apple ipad is now broken and she has 83 views. I know this is entirely off topic but I had to share it with someone! 437026

    Reply

Leave a Comment