From ec3f6b0791a17f173eff9086785e8da4a9f350d1 Mon Sep 17 00:00:00 2001 From: Attila Seres Date: Thu, 4 Oct 2018 16:08:33 +0200 Subject: [PATCH] Fix testcase for timestamp --- test/test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index 4cd7689..681ab12 100644 --- a/test/test.js +++ b/test/test.js @@ -448,8 +448,9 @@ describe('Gulp plugin', () => { const valRgx = /^([0-9]{4})\.([0-9]{2})\.([0-9]{2})_([0-9]{2})\.([0-9]{2})\.([0-9]{2})$/ dateStr.should.match(valRgx) const match = valRgx.exec(dateStr) + const currentMonth = now.getMonth()+1 now.getFullYear().should.be.equal(Number(match[1])) - now.getMonth().should.be.equal(Number(match[2])) + currentMonth.should.be.equal(Number(match[2])) now.getDate().should.be.equal(Number(match[3])) now.getHours().should.be.equal(Number(match[4])) now.getMinutes().should.be.equal(Number(match[5]))