From 6f370395eaa7063ad6ce5e6daa0575dcbdb16afa Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Mon, 22 May 2017 08:06:14 -0600 Subject: [PATCH] Updated common test --- test/common/shouldDo.test.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/common/shouldDo.test.js b/test/common/shouldDo.test.js index b9972e831f..144a2663be 100644 --- a/test/common/shouldDo.test.js +++ b/test/common/shouldDo.test.js @@ -480,8 +480,20 @@ describe('shouldDo', () => { context('Every X Weeks', () => { it('leaves daily inactive if it has not been the specified number of weeks', () => { + dailyTask.repeat = { + su: false, + s: false, + f: false, + th: false, + w: false, + t: false, + m: false, + }; + + day = moment(); + dailyTask.repeat[DAY_MAPPING[day.day()]] = true; dailyTask.everyX = 3; - let tomorrow = moment().add(1, 'day').toDate(); + let tomorrow = day.add(2, 'weeks').day(day.day()).toDate(); expect(shouldDo(tomorrow, dailyTask, options)).to.equal(false); });