File tree Expand file tree Collapse file tree 2 files changed +0
-9
lines changed
Expand file tree Collapse file tree 2 files changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,7 @@ export class Deadline {
4040
4141 if ( deadline <= 0 ) {
4242 throw new Error ( 'deadline should be greater than 0' ) ;
43- } else if ( now . plus ( 24 , ChronoUnit . HOURS ) . compareTo ( deadlineDateTime ) !== 1 ) {
44- throw new Error ( 'deadline should be less than 24 hours' ) ;
4543 }
46-
4744 return new Deadline ( deadlineDateTime . minusMillis ( epochAdjustment . toMillis ( ) ) . toEpochMilli ( ) ) ;
4845 }
4946
Original file line number Diff line number Diff line change @@ -41,12 +41,6 @@ describe('Deadline', () => {
4141 } ) . to . throw ( Error ) ;
4242 } ) ;
4343
44- it ( 'should throw error deadline greater than 24h' , ( ) => {
45- expect ( ( ) => {
46- Deadline . create ( epochAdjustment , 2 , ChronoUnit . DAYS ) ;
47- } ) . to . throw ( Error ) ;
48- } ) ;
49-
5044 it ( 'should createComplete date with Deadline array' , ( ) => {
5145 const deadline = Deadline . createFromDTO ( '51110867862' ) ;
5246
You can’t perform that action at this time.
0 commit comments