mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-11 12:33:45 +03:00
test: unflake "beforeAll and afterAll should have a separate timeout" (#23263)
This commit is contained in:
parent
871032b411
commit
70589c0113
@ -703,26 +703,26 @@ test('beforeAll and afterAll should have a separate timeout', async ({ runInline
|
||||
import { test, expect } from '@playwright/test';
|
||||
test.beforeAll(async () => {
|
||||
console.log('\\n%%beforeAll');
|
||||
await new Promise(f => setTimeout(f, 300));
|
||||
await new Promise(f => setTimeout(f, 1600));
|
||||
});
|
||||
test.beforeAll(async () => {
|
||||
console.log('\\n%%beforeAll2');
|
||||
await new Promise(f => setTimeout(f, 300));
|
||||
await new Promise(f => setTimeout(f, 1600));
|
||||
});
|
||||
test('passed', async () => {
|
||||
console.log('\\n%%test');
|
||||
await new Promise(f => setTimeout(f, 300));
|
||||
await new Promise(f => setTimeout(f, 1600));
|
||||
});
|
||||
test.afterAll(async () => {
|
||||
console.log('\\n%%afterAll');
|
||||
await new Promise(f => setTimeout(f, 300));
|
||||
await new Promise(f => setTimeout(f, 1600));
|
||||
});
|
||||
test.afterAll(async () => {
|
||||
console.log('\\n%%afterAll2');
|
||||
await new Promise(f => setTimeout(f, 300));
|
||||
await new Promise(f => setTimeout(f, 1600));
|
||||
});
|
||||
`,
|
||||
}, { timeout: '500' });
|
||||
}, { timeout: '3000' });
|
||||
expect(result.exitCode).toBe(0);
|
||||
expect(result.passed).toBe(1);
|
||||
expect(result.outputLines).toEqual([
|
||||
|
Loading…
Reference in New Issue
Block a user