Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tests for highlight-start-end classes
  • Loading branch information
g-wilson committed Sep 8, 2017
commit 3b4ab20db9bf7a0505e9d5f04837083c63a719fe
12 changes: 12 additions & 0 deletions test/unit/specs/Datepicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,18 @@ describe('Datepicker highlight date', () => {
expect(vm.isHighlightedDate(new Date(2016, 9, 2))).to.equal(true)
expect(vm.isHighlightedDate(new Date(2016, 9, 3))).to.equal(false)
})

it('should detect the first date of the highlighted dates', () => {
expect(vm.isHighlightStart(new Date(2016, 12, 4))).to.equal(true)
expect(vm.isHighlightStart(new Date(2016, 12, 3))).to.equal(false)
expect(vm.isHighlightStart(new Date(2016, 12, 5))).to.equal(false)
})

it('should detect the last date of the highlighted dates', () => {
expect(vm.isHighlightEnd(new Date(2016, 12, 8))).to.equal(true)
expect(vm.isHighlightEnd(new Date(2016, 12, 6))).to.equal(false)
expect(vm.isHighlightEnd(new Date(2016, 12, 7))).to.equal(false)
})
})

describe('Datepicker with monday as first day of week', () => {
Expand Down