|
1 | 1 | import type { CancelReason, File, Suite, Task, TaskEventPack, TaskResultPack, Test, TestAnnotation, VitestRunner } from '@vitest/runner' |
2 | 2 | import type { SerializedConfig, TestExecutionMethod, WorkerGlobalState } from 'vitest' |
3 | | -import type { VitestExecutor } from 'vitest/execute' |
4 | 3 | import type { VitestBrowserClientMocker } from './mocker' |
5 | 4 | import { globalChannel, onCancel } from '@vitest/browser/client' |
6 | 5 | import { page, userEvent } from '@vitest/browser/context' |
@@ -77,7 +76,7 @@ export function createBrowserRunner( |
77 | 76 | if (this.config.browser.screenshotFailures && document.body.clientHeight > 0 && task.result?.state === 'fail') { |
78 | 77 | const screenshot = await page.screenshot({ |
79 | 78 | timeout: this.config.browser.providerOptions?.actionTimeout ?? 5_000, |
80 | | - }).catch((err) => { |
| 79 | + } as any /** TODO */).catch((err) => { |
81 | 80 | console.error('[vitest] Failed to take a screenshot', err) |
82 | 81 | }) |
83 | 82 | if (screenshot) { |
@@ -239,8 +238,8 @@ export async function initiateRunner( |
239 | 238 | }) |
240 | 239 |
|
241 | 240 | const [diffOptions] = await Promise.all([ |
242 | | - loadDiffConfig(config, executor as unknown as VitestExecutor), |
243 | | - loadSnapshotSerializers(config, executor as unknown as VitestExecutor), |
| 241 | + loadDiffConfig(config, executor as any), |
| 242 | + loadSnapshotSerializers(config, executor as any), |
244 | 243 | ]) |
245 | 244 | runner.config.diffOptions = diffOptions |
246 | 245 | getWorkerState().onFilterStackTrace = (stack: string) => { |
|
0 commit comments