diff --git a/packages/parse-duration/src/main.test.js b/packages/parse-duration/src/main.test.js index 1a5a427f..32eb2b3d 100644 --- a/packages/parse-duration/src/main.test.js +++ b/packages/parse-duration/src/main.test.js @@ -25,14 +25,17 @@ describe('@alwatr/parse-duration', () => { }); it('should throw error for invalid duration', () => { + // @ts-expect-error testing invalid input expect(() => parseDuration('1x')).toThrow('invalid_unit'); }); it('should throw error for invalid conversion unit', () => { + // @ts-expect-error testing invalid input expect(() => parseDuration('1h', 'x')).toThrow('invalid_unit'); }); it('should throw error for non-numeric duration', () => { + // @ts-expect-error testing invalid input expect(() => parseDuration('xh')).toThrow('not_a_number'); }); });