From a16099c8bdfeb8c48895022dd2d5f84b5161fe2a Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 16 Jun 2021 08:31:49 -0700 Subject: [PATCH] chore(tests): use path.join Diff is doing things more properly now so the tests should reflect that --- 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..db153eeda43b5 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 = join('/', '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