Skip to content

Commit f760a48

Browse files
committed
test: fix snapshot file
1 parent d898204 commit f760a48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/run.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const file = process.argv[2]
55

66
const node = process.execPath
77
const {execFile} = require('child_process')
8-
const {relative, basename} = require('path')
8+
const {relative, basename, resolve} = require('path')
99

1010
t.cleanSnapshot = o => o
1111
.replace(/(\n at [^\n]*)+/g, '\n{STACK}')
@@ -26,7 +26,7 @@ t.cleanSnapshot = o => o
2626
.trim() + '\n'
2727

2828
const runTest = file => t => {
29-
t.snapshotFile = `tap-snapshots/test/fixtures/${basename(file)}.test.cjs`
29+
t.snapshotFile = resolve(__dirname, `../tap-snapshots/test/fixtures/${basename(file)}.test.cjs`)
3030
const firstLine = fs.readFileSync(file, 'utf8').split(/\n/)[0]
3131
// default all node versions to old default for consistency
3232
const match = firstLine && firstLine.match(/^#!\/usr\/bin\/env node (.*)$/)

0 commit comments

Comments
 (0)