Skip to content

Commit c1d4cde

Browse files
committed
test: improve test coverage for CLI
1 parent 070bac5 commit c1d4cde

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎test/unit/cli.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,11 @@ describe('cli', () => {
219219
expect(mockServe).toHaveBeenCalledWith({ directory: path.resolve('.') }, 8521, 'localhost', false);
220220
});
221221
});
222+
223+
it('should resolve open module in requireOpen', async () => {
224+
const anotherCli = new CLI();
225+
const openModule = await import('open');
226+
227+
await expect(anotherCli.requireOpen()).resolves.toBe(openModule.default);
228+
});
222229
});

0 commit comments

Comments
 (0)