Skip to content

Commit

Permalink
Fix testcase for timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Attila Seres committed Oct 5, 2018
1 parent 5bbb08c commit ec3f6b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down

0 comments on commit ec3f6b0

Please sign in to comment.