Skip to content

Commit

Permalink
fix: date in logger tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordy Cabannes committed Jan 4, 2024
1 parent f230048 commit 2c18341
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/logger/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1496,9 +1496,12 @@ describe('Logger', () => {
const date = new Date()
const logFilePath = path.join(
JEST_PROCESS_ROOT_PATH,
`twake-${date.getFullYear()}-${
date.getMonth() + 1
}-${date.getUTCDate()}.log`
`twake-${date.getFullYear()}-${(date.getMonth() + 1)
.toString()
.padStart(2, '0')}-${date
.getUTCDate()
.toString()
.padStart(2, '0')}.log`
)
expect(fs.existsSync(logFilePath)).toEqual(true)
fs.unlinkSync(logFilePath)
Expand Down

0 comments on commit 2c18341

Please sign in to comment.