Skip to content

Commit 66bcedf

Browse files
committed
filter version out of snapshot
1 parent 157373b commit 66bcedf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tap-snapshots/test/bin.ts.test.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Object {
1818
Usage:
1919
glob [options] [<pattern> [<pattern> ...]]
2020
21-
Glob v10.2.7
21+
Glob v{VERSION}
2222
2323
Expand the positional glob expression arguments into any matching file system
2424
paths found.

test/bin.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { spawn, SpawnOptions } from 'child_process'
22
import t from 'tap'
33
import { sep } from 'path'
4+
import { version } from '../package.json'
45
const bin = require.resolve('../dist/cjs/src/bin.js')
56

7+
t.cleanSnapshot = s => s.split(version).join('{VERSION}')
8+
69
interface Result {
710
args: string[]
811
options: SpawnOptions

0 commit comments

Comments
 (0)