Skip to content

Commit d16ee45

Browse files
committed
chore(tests): use path.resolve
npm-package-arg is doing things more properly now so the tests should reflect that PR-URL: #3426 Credit: @wraithgar Close: #3426 Reviewed-by: @ruyadorno
1 parent de820a0 commit d16ee45

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/lib/diff.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,12 +549,13 @@ t.test('single arg', t => {
549549
t.test('dir spec type', t => {
550550
t.plan(2)
551551

552+
const otherPath = resolve('/path/to/other-dir')
552553
libnpmdiff = async ([a, b], opts) => {
553-
t.equal(a, 'file:/path/to/other-dir', 'should target dir')
554+
t.equal(a, `file:${otherPath}`, 'should target dir')
554555
t.equal(b, `file:${fooPath}`, 'should compare to cwd')
555556
}
556557

557-
config.diff = ['/path/to/other-dir']
558+
config.diff = [otherPath]
558559
diff.exec([], err => {
559560
if (err)
560561
throw err

0 commit comments

Comments
 (0)