actions-hugo/__tests__/get-os.test.ts
2024-08-12 13:17:37 +02:00

16 lines
353 B
TypeScript

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