739a95f1e7
* 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 )
15 lines
354 B
TypeScript
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');
|
|
});
|
|
});
|