mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-24 14:55:38 +03:00
chore: enable tsc for ttest sources (#21018)
This commit is contained in:
parent
595502ac46
commit
24c8d45c70
@ -123,9 +123,9 @@ export async function pollAgainstTimeout<T>(callback: () => Promise<{ continuePo
|
||||
: await wrappedCallback().then(value => ({ result: value, timedOut: false }));
|
||||
if (received.timedOut)
|
||||
break;
|
||||
lastResult = received.result.result;
|
||||
if (!received.result.continuePolling)
|
||||
return { result: received.result.result, timedOut: false };
|
||||
lastResult = (received as any).result.result;
|
||||
if (!(received as any).result.continuePolling)
|
||||
return { result: lastResult, timedOut: false };
|
||||
const interval = pollIntervals!.shift() ?? lastPollInterval;
|
||||
if (timeout !== 0 && startTime + timeout <= monotonicTime() + interval)
|
||||
break;
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
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';
|
||||
|
||||
test('should stop tracing with trace: on-first-retry, when not retrying', async ({ runInlineTest }, testInfo) => {
|
||||
|
@ -20,7 +20,7 @@ import url from 'url';
|
||||
import { test as baseTest, expect, createImage } from './playwright-test-fixtures';
|
||||
import type { HttpServer } from '../../packages/playwright-core/src/utils';
|
||||
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> }>({
|
||||
showReport: async ({ page }, use, testInfo) => {
|
||||
|
@ -182,7 +182,7 @@ test('should truncate long test names', async ({ runInlineTest }) => {
|
||||
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);
|
||||
|
||||
const lines = result.output.split('\n').slice(3, 11);
|
||||
|
@ -18,5 +18,5 @@
|
||||
},
|
||||
},
|
||||
"include": ["**/*.spec.js", "**/*.ts", "index.d.ts"],
|
||||
"exclude": ["playwright-test/", "components/"]
|
||||
"exclude": ["components/"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user