chore: enable tsc for ttest sources (#21018)

This commit is contained in:
Dmitry Gozman 2023-02-19 11:18:07 -08:00 committed by GitHub
parent 595502ac46
commit 24c8d45c70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -123,9 +123,9 @@ export async function pollAgainstTimeout<T>(callback: () => Promise<{ continuePo
: await wrappedCallback().then(value => ({ result: value, timedOut: false })); : await wrappedCallback().then(value => ({ result: value, timedOut: false }));
if (received.timedOut) if (received.timedOut)
break; break;
lastResult = received.result.result; lastResult = (received as any).result.result;
if (!received.result.continuePolling) if (!(received as any).result.continuePolling)
return { result: received.result.result, timedOut: false }; return { result: lastResult, timedOut: false };
const interval = pollIntervals!.shift() ?? lastPollInterval; const interval = pollIntervals!.shift() ?? lastPollInterval;
if (timeout !== 0 && startTime + timeout <= monotonicTime() + interval) if (timeout !== 0 && startTime + timeout <= monotonicTime() + interval)
break; break;

View File

@ -15,7 +15,7 @@
*/ */
import { test, expect } from './playwright-test-fixtures'; import { test, expect } from './playwright-test-fixtures';
import { ZipFile } from '../../packages/playwright-core/lib/utils'; const { ZipFile } = require('../../packages/playwright-core/lib/utils');
import fs from 'fs'; import fs from 'fs';
test('should stop tracing with trace: on-first-retry, when not retrying', async ({ runInlineTest }, testInfo) => { test('should stop tracing with trace: on-first-retry, when not retrying', async ({ runInlineTest }, testInfo) => {

View File

@ -20,7 +20,7 @@ import url from 'url';
import { test as baseTest, expect, createImage } from './playwright-test-fixtures'; import { test as baseTest, expect, createImage } from './playwright-test-fixtures';
import type { HttpServer } from '../../packages/playwright-core/src/utils'; import type { HttpServer } from '../../packages/playwright-core/src/utils';
import { startHtmlReportServer } from '../../packages/playwright-test/lib/reporters/html'; import { startHtmlReportServer } from '../../packages/playwright-test/lib/reporters/html';
import { spawnAsync } from 'playwright-core/lib/utils'; const { spawnAsync } = require('../../packages/playwright-core/lib/utils');
const test = baseTest.extend<{ showReport: (reportFolder?: string) => Promise<void> }>({ const test = baseTest.extend<{ showReport: (reportFolder?: string) => Promise<void> }>({
showReport: async ({ page }, use, testInfo) => { showReport: async ({ page }, use, testInfo) => {

View File

@ -182,7 +182,7 @@ test('should truncate long test names', async ({ runInlineTest }) => {
test.skip('skipped very long name', async () => { test.skip('skipped very long name', async () => {
}); });
`, `,
}, { reporter: 'list', retries: 0 }, { PWTEST_TTY_WIDTH: 50 }); }, { reporter: 'list', retries: 0 }, { PWTEST_TTY_WIDTH: '50' });
expect(result.exitCode).toBe(1); expect(result.exitCode).toBe(1);
const lines = result.output.split('\n').slice(3, 11); const lines = result.output.split('\n').slice(3, 11);

View File

@ -18,5 +18,5 @@
}, },
}, },
"include": ["**/*.spec.js", "**/*.ts", "index.d.ts"], "include": ["**/*.spec.js", "**/*.ts", "index.d.ts"],
"exclude": ["playwright-test/", "components/"] "exclude": ["components/"]
} }