diff --git a/test/lib/diff.js b/test/lib/diff.js index 993dfa4d60718..2fb38c9b127e4 100644 --- a/test/lib/diff.js +++ b/test/lib/diff.js @@ -549,12 +549,13 @@ t.test('single arg', t => { t.test('dir spec type', t => { t.plan(2) + const otherPath = resolve('/path/to/other-dir') libnpmdiff = async ([a, b], opts) => { - t.equal(a, 'file:/path/to/other-dir', 'should target dir') + t.equal(a, `file:${otherPath}`, 'should target dir') t.equal(b, `file:${fooPath}`, 'should compare to cwd') } - config.diff = ['/path/to/other-dir'] + config.diff = [otherPath] diff.exec([], err => { if (err) throw err