mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2025-06-18 01:55:29 +08:00
16 lines
353 B
TypeScript
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');
|
|
});
|
|
});
|