@@ -46,14 +46,24 @@ it('should parse issue 285 case correctly', function () {
46
46
const events = new IcalExpander ( { ics : icaljsIssue285 } )
47
47
. between ( new Date ( '2017-01-03T00:00:00.000Z' ) , new Date ( '2017-01-25T00:00:00.000Z' ) ) ;
48
48
49
- assert . deepEqual ( events . events . map ( e => e . startDate . toJSDate ( ) . toISOString ( ) ) , [ '2017-01-18T08:00:00.000Z' ] ) ;
49
+ assert . deepEqual ( events . events . map ( e => e . startDate . toJSDate ( ) . toISOString ( ) ) , [ ] ) ;
50
50
assert . deepEqual ( events . occurrences . map ( e => e . startDate . toJSDate ( ) . toISOString ( ) ) , [
51
51
'2017-01-03T08:00:00.000Z' ,
52
52
'2017-01-10T08:00:00.000Z' ,
53
+ '2017-01-18T08:00:00.000Z' ,
53
54
'2017-01-24T08:00:00.000Z' ,
54
55
] ) ;
55
56
} ) ;
56
57
58
+ it ( 'should show recurring modified date using ical.js issue 285' , function ( ) {
59
+ const events = new IcalExpander ( { ics : icaljsIssue285 } )
60
+ . between ( new Date ( '2017-01-18T00:00:00.000Z' ) , new Date ( '2017-01-19T00:00:00.000Z' ) ) ;
61
+
62
+ assert . equal ( events . events . length , 0 ) ;
63
+ assert . equal ( events . occurrences . length , 1 ) ;
64
+ assert . equal ( events . occurrences [ 0 ] . item . summary , 'test event' ) ;
65
+ } ) ;
66
+
57
67
it ( 'should parse all recurring events without going on forever' , function ( ) {
58
68
const events = new IcalExpander ( { ics : recurIcs } )
59
69
. all ( ) ;
0 commit comments