Skip to content

Commit

Permalink
Merge pull request pinojs#907 from jaferkhan/PINO-905
Browse files Browse the repository at this point in the history
Eliminate quotes from ISO time
  • Loading branch information
jsumners authored Sep 13, 2020
2 parents 742f231 + 596c98f commit 97ab872
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ function prettifierMetaWrapper (pretty, dest, opts) {

if (time.match(/^\d+/)) {
time = parseInt(time)
} else {
time = time.slice(1, -1)
}

var lastObj = this.lastObj
Expand Down
4 changes: 2 additions & 2 deletions test/pretty.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ test('with custom timestamp', async ({ is }) => {
cb()
}))
await once(child, 'close')
is(strip(actual).slice(0, 8), '["test"]')
is(strip(actual).slice(0, 6), '[test]')
})

test('with custom timestamp label', async ({ is }) => {
Expand All @@ -230,7 +230,7 @@ test('with custom timestamp label', async ({ is }) => {
cb()
}))
await once(child, 'close')
is(strip(actual).slice(0, 8), '["test"]')
is(strip(actual).slice(0, 6), '[test]')
})

test('errors', async ({ isNot }) => {
Expand Down

0 comments on commit 97ab872

Please sign in to comment.