diff --git a/test/source/test.ts b/test/source/test.ts index 7a7157498c2..7554f3000ba 100644 --- a/test/source/test.ts +++ b/test/source/test.ts @@ -63,9 +63,10 @@ const testWithBrowser = ( flag?: 'FAILING' ): Implementation => { return async (t: AvaContext) => { + let closeMockApi: (() => Promise) | undefined; if (isMock) { const mockApi = await startMockApiAndCopyBuild(t); - t.closeMockApi = mockApi.close; + closeMockApi = mockApi.close; } await browserPool.withNewBrowserTimeoutAndRetry( async (t, browser) => { @@ -83,8 +84,8 @@ const testWithBrowser = ( consts, flag ); - if (t.closeMockApi) { - await t.closeMockApi(); + if (closeMockApi) { + await closeMockApi(); } t.pass(); }; diff --git a/test/source/tests/tooling/index.ts b/test/source/tests/tooling/index.ts index 0951e06e4f0..dae9c25a0b6 100644 --- a/test/source/tests/tooling/index.ts +++ b/test/source/tests/tooling/index.ts @@ -12,7 +12,6 @@ export type AvaContext = ExecutionContext & { attemptText?: string; extensionDir?: string; urls?: TestUrls; - closeMockApi?: () => Promise; }; const MAX_ATT_SIZE = 5 * 1024 * 1024;