Skip to content

Commit

Permalink
Add tests for null start and end to improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bibekg committed Sep 10, 2018
1 parent 5ecb303 commit 2f8107e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/lib/selection-schemes/linear.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ describe('linear selection scheme', () => {
expect(result).toContain(selectionStart.toString())
})

test('it handles a null start and end', () => {
expect(linear(null, null, dates)).toHaveLength(0)
})

test('it handles a cross-day selection', () => {
const expected = []
const START = { DATE: 1, TIME: 10 }
Expand Down
4 changes: 4 additions & 0 deletions test/lib/selection-schemes/square.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ describe('square selection scheme', () => {
expect(result).toContain(selectionStart.toString())
})

test('it handles a null start and end', () => {
expect(square(null, null, dates)).toHaveLength(0)
})

test('it handles a cross-day selection', () => {
const expected = []
const START = { DATE: 1, TIME: 10 }
Expand Down

0 comments on commit 2f8107e

Please sign in to comment.