Skip to content

Commit

Permalink
test: make it pass regardless timezone, #257
Browse files Browse the repository at this point in the history
  • Loading branch information
harttle committed Oct 8, 2020
1 parent 8ee9bd7 commit b11df79
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/unit/util/strftime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ describe('util/strftime', function () {
expect(t(then, '%j')).to.equal('066')
})
it('should take count of leap years', function () {
const date = new Date('2001-03-01')
const date = new Date('2001 03 01')
expect(t(date, '%j')).to.equal('060')
})
it('should take count of leap years', function () {
const date = new Date('2000-03-01')
const date = new Date('2000 03 01')
expect(t(date, '%j')).to.equal('061')
})
})
it('should format %q as date suffix', function () {
const st = new Date('2016-03-01T03:05:03.000Z')
const nd = new Date('2016-03-02T03:05:03.000Z')
const rd = new Date('2016-03-03T03:05:03.000Z')
const st = new Date('2016-03-01 03:05:03')
const nd = new Date('2016-03-02 03:05:03')
const rd = new Date('2016-03-03 03:05:03')
expect(t(st, '%q')).to.equal('st')
expect(t(nd, '%q')).to.equal('nd')
expect(t(rd, '%q')).to.equal('rd')
Expand Down

0 comments on commit b11df79

Please sign in to comment.