From a5bfb96855c293c496e774fbe40c157591f5fb1c Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Mon, 22 Aug 2016 11:24:59 -0700 Subject: [PATCH] add dateSeparator validation test --- test/src/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/src/index.js b/test/src/index.js index 3d38677..02ef6c5 100644 --- a/test/src/index.js +++ b/test/src/index.js @@ -69,6 +69,12 @@ describe('Esqueue class', function () { queue = new Esqueue(indexName, { client }); }); + it('should throw with invalid dateSeparator setting', function () { + queue = new Esqueue(indexName, { client, dateSeparator: 'a' }); + const fn = () => queue.addJob(jobType, payload); + expect(fn).to.throwException(); + }); + it('should pass queue instance, index name, type and payload', function () { const job = queue.addJob(jobType, payload); expect(job.getProp('queue')).to.equal(queue);