Skip to content

Commit

Permalink
[#10] Add test cases about weekday service
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanLin-TWer committed Feb 20, 2017
1 parent 966017f commit dad62b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/unit/services/weekday-service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,15 @@ describe('weekday service', () => {
let weekdays = weekdayService.weekdaysBetween('2017-02-07', '2017-02-09')
expect(weekdays).to.equal(3)
})

it('should return 5 when date range is 2017-02-04(Sat)~2017-02-12(Sun)', () => {
let weekdays = weekdayService.weekdaysBetween('2017-02-04', '2017-02-12')
expect(weekdays).to.equal(5)
})

it('should return 11 when date range is 2017-02-06(Mon)~2017-02-20(Mon)', () => {
let weekdays = weekdayService.weekdaysBetween('2017-02-06', '2017-02-20')
expect(weekdays).to.equal(11)
})
})
})

0 comments on commit dad62b4

Please sign in to comment.