From 789ef01fb353f3712e08328eb0daf6dc804728bf Mon Sep 17 00:00:00 2001 From: wanghx Date: Thu, 11 Aug 2022 14:41:20 +0800 Subject: [PATCH] fix: lint --- test/app.test.ts | 4 ++-- test/utils/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/app.test.ts b/test/app.test.ts index ca2a05f..42d96ba 100644 --- a/test/app.test.ts +++ b/test/app.test.ts @@ -79,7 +79,7 @@ describe('test/app.test.ts', () => { const manifest = await loadManifest(appDir); const app = new ArtusApplication(); await app.load(manifest.default, appDir); - mm(LifecycleManager.prototype, 'emitHook', () => Promise.reject('err')); + mm(LifecycleManager.prototype, 'emitHook', () => Promise.reject(new Error('err'))); // test run await app.run().catch(() => null); @@ -89,7 +89,7 @@ describe('test/app.test.ts', () => { expect((app as any).state).toBe(ArtusApplicationState.STARTED); // test close - mm(LifecycleManager.prototype, 'emitHook', () => Promise.reject('err')); + mm(LifecycleManager.prototype, 'emitHook', () => Promise.reject(new Error('err'))); await app.close().catch(() => null); expect((app as any).state).toBe(ArtusApplicationState.CLOSE_ERROR); mm.restore(); diff --git a/test/utils/index.ts b/test/utils/index.ts index c226dd8..2409a44 100644 --- a/test/utils/index.ts +++ b/test/utils/index.ts @@ -7,7 +7,7 @@ export async function loadManifest(baseDir: string) { configDir: 'config', extensions: ['.ts'], }); - return await scanner.scan(baseDir); + return scanner.scan(baseDir); } export async function createApp(baseDir: string) {