Skip to content

Commit 31c518a

Browse files
committed
add registerCompletionHandler
1 parent 3991b74 commit 31c518a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/source/test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ export type CommonAcct = 'compatibility' | 'compose' | 'ci.tests.gmail';
5252
const asyncExec = promisify(exec);
5353
const browserPool = new BrowserPool(consts.POOL_SIZE, 'browserPool', buildDir, isMock, undefined, undefined, consts.IS_LOCAL_DEBUG);
5454

55+
test.before('set registerCompletionHandler', async () => {
56+
const dynamicImport = new Function('specifier', 'return import(specifier)');
57+
const registerCompletionHandler = await dynamicImport('ava').registerCompletionHandler;
58+
registerCompletionHandler(() => {
59+
process.exit();
60+
});
61+
});
62+
5563
test.beforeEach('set timeout', async t => {
5664
t.timeout(consts.TIMEOUT_EACH_RETRY);
5765
});

0 commit comments

Comments
 (0)