File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 - Martha's birthday (every 05-24)
1919 - Meeting with Jack (on 2022-05-03)
2020 - Review logs (every last day)
21+ - Send invoice (every last weekday)
2122 ``` )
2223 (def result (schedule_parser/parse schedule-string ))
2324 (def scheduled-tasks (result :tasks ))
24- (test (length scheduled-tasks ) 7 )
25+ (test (length scheduled-tasks ) 8 )
2526 (let [task (scheduled-tasks 0 )]
2627 (test (task :title ) " Weekly Meeting" )
2728 (test (task :done ) false )
3435 (test (task :schedule ) " on 2022-05-03" ))
3536 (let [task (scheduled-tasks 6 )]
3637 (test (task :title ) " Review logs" )
37- (test (task :schedule ) " every last day" )))
38+ (test (task :schedule ) " every last day" ))
39+ (let [task (scheduled-tasks 7 )]
40+ (test (task :title ) " Send invoice" )
41+ (test (task :schedule ) " every last weekday" )))
3842
3943(deftest " returns an error when the schedule can't be parsed"
4044 (def schedule-string
You can’t perform that action at this time.
0 commit comments