Skip to content

Commit

Permalink
remove closeMockApi from AvaContext
Browse files Browse the repository at this point in the history
  • Loading branch information
sosnovsky committed Feb 1, 2023
1 parent efe8f74 commit 9851558
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions test/source/test.ts
Expand Up @@ -63,9 +63,10 @@ const testWithBrowser = (
flag?: 'FAILING'
): Implementation<unknown[]> => {
return async (t: AvaContext) => {
let closeMockApi: (() => Promise<void>) | undefined;
if (isMock) {
const mockApi = await startMockApiAndCopyBuild(t);
t.closeMockApi = mockApi.close;
closeMockApi = mockApi.close;
}
await browserPool.withNewBrowserTimeoutAndRetry(
async (t, browser) => {
Expand All @@ -83,8 +84,8 @@ const testWithBrowser = (
consts,
flag
);
if (t.closeMockApi) {
await t.closeMockApi();
if (closeMockApi) {
await closeMockApi();
}
t.pass();
};
Expand Down
1 change: 0 additions & 1 deletion test/source/tests/tooling/index.ts
Expand Up @@ -12,7 +12,6 @@ export type AvaContext = ExecutionContext<unknown> & {
attemptText?: string;
extensionDir?: string;
urls?: TestUrls;
closeMockApi?: () => Promise<void>;
};

const MAX_ATT_SIZE = 5 * 1024 * 1024;
Expand Down

0 comments on commit 9851558

Please sign in to comment.