From 4e7235212e8d3ca81b497a675310065cf23d9d66 Mon Sep 17 00:00:00 2001 From: ninjaPixel Date: Wed, 22 Nov 2017 00:45:19 +0000 Subject: [PATCH] Add a test to catch the bug See https://github.com/SSENSE/node-sscheduler/issues/4 --- .../data/01-single-day/01-schedule/expected02.json | 5 +++++ .../unit/data/01-single-day/01-schedule/input02.json | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/unit/data/01-single-day/01-schedule/expected02.json create mode 100644 tests/unit/data/01-single-day/01-schedule/input02.json diff --git a/tests/unit/data/01-single-day/01-schedule/expected02.json b/tests/unit/data/01-single-day/01-schedule/expected02.json new file mode 100644 index 0000000..ee1e5d2 --- /dev/null +++ b/tests/unit/data/01-single-day/01-schedule/expected02.json @@ -0,0 +1,5 @@ +{ + "2017-01-23": [ + "09:00" + ] +} \ No newline at end of file diff --git a/tests/unit/data/01-single-day/01-schedule/input02.json b/tests/unit/data/01-single-day/01-schedule/input02.json new file mode 100644 index 0000000..c421132 --- /dev/null +++ b/tests/unit/data/01-single-day/01-schedule/input02.json @@ -0,0 +1,11 @@ +{ + "schedule": { + "monday": { + "from": "09:00", "to": "17:00" + } + }, + "from": "2017-01-23", + "to": "2017-01-24", + "interval": 60, + "duration": 480 +}