tet: unflake some test runner tests (#23240)

- `unhandled rejection during beforeAll should be reported and prevent
more tests` had timeout of 100ms that is too short on busy system;
- `runTSC` is always slow, so mark as such.
This commit is contained in:
Dmitry Gozman 2023-05-23 13:31:23 -07:00 committed by GitHub
parent 5926c67703
commit 2858ca95d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 5 deletions

View File

@ -673,7 +673,7 @@ test('unhandled rejection during beforeAll should be reported and prevent more t
Promise.resolve().then(() => {
throw new Error('Oh my');
});
await new Promise(f => setTimeout(f, 100));
await new Promise(f => setTimeout(f, 1000));
});
test.afterAll(() => {
console.log('\\n%%afterAll');

View File

@ -296,6 +296,8 @@ export const test = base
},
runTSC: async ({ childProcess }, use, testInfo) => {
testInfo.slow();
await use(async files => {
const baseDir = await writeFiles(testInfo, { 'tsconfig.json': JSON.stringify(TSCONFIG), ...files }, true);
const tsc = childProcess({

View File

@ -16,8 +16,6 @@
import { test, expect } from './playwright-test-fixtures';
test.slow();
test('basics should work', async ({ runTSC }) => {
const result = await runTSC({
'a.spec.ts': `

View File

@ -16,8 +16,6 @@
import { test, expect } from './playwright-test-fixtures';
test.slow();
test('should check types of fixtures', async ({ runTSC }) => {
const result = await runTSC({
'helper.ts': `