Skip to content

Commit

Permalink
timstamp only test utc values due to CI difference in time zone settings
Browse files Browse the repository at this point in the history
  • Loading branch information
rosskevin committed Jan 22, 2025
1 parent 0b9b42d commit 663d9f5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/logger-node/src/__tests__/timestamp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ describe('timestamp', () => {
// const date = new Date('2025-01-02T03:04:05.006Z')
const date = new Date(Date.UTC(2025, 0, 2, 3, 4, 5, 6))
it('should format date', () => {
// not sure why CI is giving me trouble - perhaps date settings on container? skip for now
// CI gives me grief on these values when using non-utc, so just test utc

// expect(timestamp('YYYY-MM-DD HH:mm:ss.ms', false, date)).toEqual('2025-01-01 21:04:05.006')
// expect(timestamp('YYYY-MM-DD HH:mm:ss.ms', true, date)).toEqual('2025-01-02 03:04:05.006')
expect(timestamp('HH:mm:ss', false, date)).toEqual('21:04:05')
// expect(timestamp('HH:mm:ss', true, date)).toEqual('03:04:05')
expect(timestamp('YYYY-MM-DD HH:mm:ss.ms', true, date)).toEqual('2025-01-02 03:04:05.006')
// expect(timestamp('HH:mm:ss', false, date)).toEqual('21:04:05')
expect(timestamp('HH:mm:ss', true, date)).toEqual('03:04:05')
})
})

0 comments on commit 663d9f5

Please sign in to comment.