testingJavaScriptTestingMediumHow do you test asynchronous code in Jest?1Use async/await or return a promise in the test function2Use a while loop until it resolves3Async code cannot be tested4Only with setTimeoutBack to list