Skip to content

Commit

Permalink
fixup! tests for npm help
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Dec 14, 2020
1 parent 25d2784 commit 66792ea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/lib/help.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { test } = require('tap')
const requireInject = require('require-inject')
const { EventEmitter } = require('events')
const path = require('path')

let npmUsageArg = null
const npmUsage = (arg) => {
Expand Down Expand Up @@ -210,7 +211,7 @@ test('npm help 1 install', t => {
if (err)
throw err

t.match(openUrlArg, /commands\/npm-install.html$/, 'attempts to open the correct url')
t.match(openUrlArg, /commands(\/|\\)npm-install.html$/, 'attempts to open the correct url')
t.end()
})
})
Expand All @@ -233,7 +234,7 @@ test('npm help 5 install', t => {
if (err)
throw err

t.match(openUrlArg, /configuring-npm\/install.html$/, 'attempts to open the correct url')
t.match(openUrlArg, /configuring-npm(\/|\\)install.html$/, 'attempts to open the correct url')
t.end()
})
})
Expand All @@ -255,7 +256,7 @@ test('npm help 7 config', t => {
if (err)
throw err

t.match(openUrlArg, /using-npm\/config.html$/, 'attempts to open the correct url')
t.match(openUrlArg, /using-npm(\/|\\)config.html$/, 'attempts to open the correct url')
t.end()
})
})
Expand Down

0 comments on commit 66792ea

Please sign in to comment.