test(ganttDb): update inclusive end date tests

This commit is contained in:
Jason Würtz
2019-07-07 16:27:41 -03:00
parent 660e0f3d8b
commit 0a567a3ef9

View File

@@ -18,13 +18,14 @@ describe('when using the ganttDb', function () {
}) })
it.each` it.each`
fn | expected fn | expected
${'getTasks'} | ${[]} ${'getTasks'} | ${[]}
${'getTitle'} | ${''} ${'getTitle'} | ${''}
${'getDateFormat'}| ${''} ${'getDateFormat'} | ${''}
${'getAxisFormat'}| ${''} ${'getAxisFormat'} | ${''}
${'getExcludes'} | ${[]} ${'getExcludes'} | ${[]}
${'getSections'} | ${[]} ${'getSections'} | ${[]}
${'endDatesAreInclusive'} | ${false}
`('should clear $fn', ({ fn, expected }) => { `('should clear $fn', ({ fn, expected }) => {
expect(ganttDb[ fn ]()).toEqual(expected) expect(ganttDb[ fn ]()).toEqual(expected)
}) })
@@ -151,7 +152,8 @@ describe('when using the ganttDb', function () {
describe('when setting inclusive end dates', function () { describe('when setting inclusive end dates', function () {
beforeEach(function () { beforeEach(function () {
ganttDb.setDateFormat('YYYY-MM-DD', true) ganttDb.setDateFormat('YYYY-MM-DD')
ganttDb.enableInclusiveEndDates()
ganttDb.addTask('test1', 'id1,2019-02-01,1d') ganttDb.addTask('test1', 'id1,2019-02-01,1d')
ganttDb.addTask('test2', 'id2,2019-02-01,2019-02-03') ganttDb.addTask('test2', 'id2,2019-02-01,2019-02-03')
}) })