actions-hugo/__tests__/get-os.test.ts
Shohei Ueda 739a95f1e7
gha: Enhance workflows (#102)
* gha: Add Pull Request to stale target
* gha: Add ncc check step (Close #98 )
* src: Rename showVersion()
* test: Add not to be cases
* Remove old comment
* gha: Add update major tag workflow (Close #97 )
2019-12-08 15:45:59 +09:00

15 lines
354 B
TypeScript

import getOS from '../src/get-os';
describe('getOS', () => {
test('test', () => {
expect(getOS('linux')).toBe('Linux');
expect(getOS('darwin')).toBe('macOS');
expect(getOS('win32')).toBe('Windows');
});
test('test exception', () => {
expect(() => {
getOS('centos');
}).toThrowError('centos is not supported');
});
});