test: Add unit testing

This commit is contained in:
peaceiris 2020-01-18 02:08:29 +00:00
parent 92ff9cca3e
commit c4e1e715b8
3 changed files with 4 additions and 8 deletions

View file

@ -56,7 +56,8 @@ describe('showVersion()', () => {
});
test('return not found', async () => {
result = await main.showVersion('gitgit', ['--version']);
expect(result.exitcode).not.toBe(0);
await expect(
main.showVersion('gitgit', ['--version'])
).rejects.toThrowError(Error);
});
});