From d16ee452a4a034caada4e9b96faf5c453a658876 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 16 Jun 2021 08:31:49 -0700 Subject: [PATCH] chore(tests): use path.resolve npm-package-arg is doing things more properly now so the tests should reflect that PR-URL: https://github.com/npm/cli/pull/3426 Credit: @wraithgar Close: #3426 Reviewed-by: @ruyadorno --- test/lib/diff.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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