Skip to content

Commit

Permalink
chore(tests): clean snapshot for lib/view.js tests
Browse files Browse the repository at this point in the history
Closes #1623

PR-URL: #3483
Credit: @wraithgar
Close: #3483
Reviewed-by: @isaacs
  • Loading branch information
wraithgar committed Jun 30, 2021
1 parent d2e298f commit 5f8cccc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tap-snapshots/test/lib/view.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ dist
dist-tags:
latest: 1.0.0
published [33ma year ago[39m
published {TIME} ago[39m
`

exports[`test/lib/view.js TAP should log info of package in current working dir specific version > must match snapshot 1`] = `
Expand All @@ -99,7 +99,7 @@ dist
dist-tags:
latest: 1.0.0
published [33ma year ago[39m
published {TIME} ago[39m
`

exports[`test/lib/view.js TAP should log package info package from git > must match snapshot 1`] = `
Expand Down Expand Up @@ -302,7 +302,7 @@ dist
dist-tags:
latest: 1.0.0
published [33ma year ago[39m
published {TIME} ago[39m
`

exports[`test/lib/view.js TAP workspaces all workspaces --json > must match snapshot 1`] = `
Expand Down
2 changes: 2 additions & 0 deletions test/lib/view.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const t = require('tap')

t.cleanSnapshot = str => str.replace(/published .*? ago/g, 'published {TIME} ago')

// run the same as tap does when running directly with node
process.stdout.columns = undefined

Expand Down

0 comments on commit 5f8cccc

Please sign in to comment.