Skip to content

Commit

Permalink
Eliminate quotes from ISO time
Browse files Browse the repository at this point in the history
  • Loading branch information
jaferkhan committed Sep 9, 2020
1 parent 742f231 commit 596c98f
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 596c98f

Please sign in to comment.