Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghx committed Aug 11, 2022
1 parent 2741e94 commit 789ef01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 789ef01

Please sign in to comment.