Skip to content

Commit

Permalink
chore(tests): use path.resolve
Browse files Browse the repository at this point in the history
npm-package-arg is doing things more properly now so the tests should
reflect that
  • Loading branch information
wraithgar committed Jun 16, 2021
1 parent de820a0 commit 5127dd3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/lib/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5127dd3

Please sign in to comment.