0👍
You need to make the it
test asynchronous:
it('should detect an asynchronous thing', async () => {
await waitFor(() => {
const something = myFunction();
expect(something).toBe(true);
}, 3500);
});
Source:stackexchange.com
0👍
You need to make the it
test asynchronous:
it('should detect an asynchronous thing', async () => {
await waitFor(() => {
const something = myFunction();
expect(something).toBe(true);
}, 3500);
});