diff --git a/tap-snapshots/test/lib/view.js.test.cjs b/tap-snapshots/test/lib/view.js.test.cjs index 9aafe50e41896..41d7a80fe3b16 100644 --- a/tap-snapshots/test/lib/view.js.test.cjs +++ b/tap-snapshots/test/lib/view.js.test.cjs @@ -82,7 +82,7 @@ dist dist-tags: latest: 1.0.0 -published a year ago +published {TIME} ago ` exports[`test/lib/view.js TAP should log info of package in current working dir specific version > must match snapshot 1`] = ` @@ -99,7 +99,7 @@ dist dist-tags: latest: 1.0.0 -published a year ago +published {TIME} ago ` exports[`test/lib/view.js TAP should log package info package from git > must match snapshot 1`] = ` @@ -302,7 +302,7 @@ dist dist-tags: latest: 1.0.0 -published a year ago +published {TIME} ago ` exports[`test/lib/view.js TAP workspaces all workspaces --json > must match snapshot 1`] = ` diff --git a/test/lib/view.js b/test/lib/view.js index 5f2e5a8add5e9..793917adc6476 100644 --- a/test/lib/view.js +++ b/test/lib/view.js @@ -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