jest wait for spinner code example
Example: jest wait for x seconds
jest.setTimeout(30000);
test('some test title', async () => {
const foo = true;
await new Promise((r) => setTimeout(r, 2000));
expect(foo).toBeDefined();
});
jest.setTimeout(30000);
test('some test title', async () => {
const foo = true;
await new Promise((r) => setTimeout(r, 2000));
expect(foo).toBeDefined();
});