File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 - Meeting with Jack (on 2022-05-03)
2020 - Review logs (every last day)
2121 - Send invoice (every last weekday)
22+ - Pay bills (every month on 15)
2223 ``` )
2324 (def result (schedule_parser/parse schedule-string ))
2425 (def scheduled-tasks (result :tasks ))
25- (test (length scheduled-tasks ) 8 )
26+ (test (length scheduled-tasks ) 9 )
2627 (let [task (scheduled-tasks 0 )]
2728 (test (task :title ) " Weekly Meeting" )
2829 (test (task :done ) false )
3839 (test (task :schedule ) " every last day" ))
3940 (let [task (scheduled-tasks 7 )]
4041 (test (task :title ) " Send invoice" )
41- (test (task :schedule ) " every last weekday" )))
42+ (test (task :schedule ) " every last weekday" ))
43+ (let [task (scheduled-tasks 8 )]
44+ (test (task :title ) " Pay bills" )
45+ (test (task :schedule ) " every month on 15" )))
4246
4347(deftest " returns an error when the schedule can't be parsed"
4448 (def schedule-string
You can’t perform that action at this time.
0 commit comments