mirror of
https://github.com/status-im/actions-hugo.git
synced 2025-01-12 13:54:27 +00:00
dc8541739a
- Support macOS and Windows (Close #24 ) - Refactoring - Error handling - TypeScript - Prettier (Close #29 ) - GHA: Add upload-artifact step for test coverage - deps: Install husky
19 lines
453 B
TypeScript
19 lines
453 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("win32");
|
|
// }).toThrowError("Windows is not supported");
|
|
expect(() => {
|
|
getOS('centos');
|
|
}).toThrowError('centos is not supported');
|
|
});
|
|
});
|