@@ -355,7 +355,7 @@ describe('NepaliDate with Time feature initialization', () => {
355355
356356 expect ( ( ) => {
357357 const _ = new NepaliDate ( year , month , day , hour , minute , second , ms )
358- } ) . toThrowError ( new ValidationError ( 'Hour should be in the range 0-23' ) )
358+ } ) . toThrow ( new ValidationError ( 'Hour should be in the range 0-23' ) )
359359 } )
360360
361361 it ( 'should throw a ValidationError for invalid negative hour' , ( ) => {
@@ -367,7 +367,7 @@ describe('NepaliDate with Time feature initialization', () => {
367367
368368 expect ( ( ) => {
369369 const _ = new NepaliDate ( year , month , day , hour , minute , second , ms )
370- } ) . toThrowError ( new ValidationError ( 'Hour should be in the range 0-23' ) )
370+ } ) . toThrow ( new ValidationError ( 'Hour should be in the range 0-23' ) )
371371 } )
372372
373373 it ( 'should throw a ValidationError for invalid minute' , ( ) => {
@@ -379,7 +379,7 @@ describe('NepaliDate with Time feature initialization', () => {
379379
380380 expect ( ( ) => {
381381 const _ = new NepaliDate ( year , month , day , hour , minute , second , ms )
382- } ) . toThrowError ( new ValidationError ( 'Minute should be in the range 0-59' ) )
382+ } ) . toThrow ( new ValidationError ( 'Minute should be in the range 0-59' ) )
383383 } )
384384
385385 it ( 'should throw a ValidationError for invalid negative minute' , ( ) => {
@@ -391,7 +391,7 @@ describe('NepaliDate with Time feature initialization', () => {
391391
392392 expect ( ( ) => {
393393 const _ = new NepaliDate ( year , month , day , hour , minute , second , ms )
394- } ) . toThrowError ( new ValidationError ( 'Minute should be in the range 0-59' ) )
394+ } ) . toThrow ( new ValidationError ( 'Minute should be in the range 0-59' ) )
395395 } )
396396
397397 it ( 'should throw a ValidationError for invalid second' , ( ) => {
@@ -403,7 +403,7 @@ describe('NepaliDate with Time feature initialization', () => {
403403
404404 expect ( ( ) => {
405405 const _ = new NepaliDate ( year , month , day , hour , minute , second , ms )
406- } ) . toThrowError ( new ValidationError ( 'Second should be in the range 0-59' ) )
406+ } ) . toThrow ( new ValidationError ( 'Second should be in the range 0-59' ) )
407407 } )
408408
409409 it ( 'should throw a ValidationError for invalid negative second' , ( ) => {
@@ -415,7 +415,7 @@ describe('NepaliDate with Time feature initialization', () => {
415415
416416 expect ( ( ) => {
417417 const _ = new NepaliDate ( year , month , day , hour , minute , second , ms )
418- } ) . toThrowError ( new ValidationError ( 'Second should be in the range 0-59' ) )
418+ } ) . toThrow ( new ValidationError ( 'Second should be in the range 0-59' ) )
419419 } )
420420
421421 it ( 'should throw a ValidationError for invalid millisecond' , ( ) => {
@@ -427,7 +427,7 @@ describe('NepaliDate with Time feature initialization', () => {
427427
428428 expect ( ( ) => {
429429 const _ = new NepaliDate ( year , month , day , hour , minute , second , ms )
430- } ) . toThrowError ( new ValidationError ( 'Millisecond should be in the range 0-999' ) )
430+ } ) . toThrow ( new ValidationError ( 'Millisecond should be in the range 0-999' ) )
431431 } )
432432
433433 it ( 'should throw a ValidationError for invalid negative millisecond' , ( ) => {
@@ -439,7 +439,7 @@ describe('NepaliDate with Time feature initialization', () => {
439439
440440 expect ( ( ) => {
441441 const _ = new NepaliDate ( year , month , day , hour , minute , second , ms )
442- } ) . toThrowError ( new ValidationError ( 'Millisecond should be in the range 0-999' ) )
442+ } ) . toThrow ( new ValidationError ( 'Millisecond should be in the range 0-999' ) )
443443 } )
444444
445445 // timezone support
@@ -680,7 +680,7 @@ describe('NepaliDate with Time feature: set methods', () => {
680680 const invalidHour = 24
681681 expect ( ( ) => {
682682 nepaliDate . setHours ( invalidHour )
683- } ) . toThrowError ( new ValidationError ( 'Hour should be in the range 0-23' ) )
683+ } ) . toThrow ( new ValidationError ( 'Hour should be in the range 0-23' ) )
684684 } )
685685 } )
686686
@@ -696,7 +696,7 @@ describe('NepaliDate with Time feature: set methods', () => {
696696 const invalidMinute = 60
697697 expect ( ( ) => {
698698 nepaliDate . setMinutes ( invalidMinute )
699- } ) . toThrowError ( new ValidationError ( 'Minute should be in the range 0-59' ) )
699+ } ) . toThrow ( new ValidationError ( 'Minute should be in the range 0-59' ) )
700700 } )
701701 } )
702702
@@ -712,7 +712,7 @@ describe('NepaliDate with Time feature: set methods', () => {
712712 const invalidSecond = 60
713713 expect ( ( ) => {
714714 nepaliDate . setSeconds ( invalidSecond )
715- } ) . toThrowError ( new ValidationError ( 'Second should be in the range 0-59' ) )
715+ } ) . toThrow ( new ValidationError ( 'Second should be in the range 0-59' ) )
716716 } )
717717 } )
718718
@@ -728,9 +728,7 @@ describe('NepaliDate with Time feature: set methods', () => {
728728 const invalidMillisecond = 1000
729729 expect ( ( ) => {
730730 nepaliDate . setMilliseconds ( invalidMillisecond )
731- } ) . toThrowError (
732- new ValidationError ( 'Millisecond should be in the range 0-999' )
733- )
731+ } ) . toThrow ( new ValidationError ( 'Millisecond should be in the range 0-999' ) )
734732 } )
735733 } )
736734
0 commit comments