Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2019-08-09 19:47:44 +0300
committerisaacs <i@izs.me>2019-08-09 19:47:44 +0300
commit941f994097852de5017322e3e1441ca6953eaebb (patch)
treec0ebbad26d7ba84417de49ec570b0f82a84f0366 /test
parent50cfe113da5fcc59c1d99b0dcf1050ace45803c7 (diff)
test: move whoami into test/tap
Diffstat (limited to 'test')
-rw-r--r--test/tap/whoami.js (renamed from test/broken-under-nyc-and-travis/whoami.js)7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/broken-under-nyc-and-travis/whoami.js b/test/tap/whoami.js
index a5668b121..4e4b3da28 100644
--- a/test/broken-under-nyc-and-travis/whoami.js
+++ b/test/tap/whoami.js
@@ -9,14 +9,14 @@ var rimraf = require('rimraf')
var opts = { cwd: __dirname }
-var FIXTURE_PATH = path.resolve(__dirname, 'fixture_npmrc')
+var FIXTURE_PATH = path.resolve(common.pkg, 'fixture_npmrc')
test('npm whoami with basic auth', function (t) {
var s = '//registry.lvh.me/:username = wombat\n' +
'//registry.lvh.me/:_password = YmFkIHBhc3N3b3Jk\n' +
'//registry.lvh.me/:email = lindsay@wdu.org.au\n'
fs.writeFileSync(FIXTURE_PATH, s, 'ascii')
- fs.chmodSync(FIXTURE_PATH, '0444')
+ fs.chmodSync(FIXTURE_PATH, 0o644)
common.npm(
[
@@ -31,7 +31,6 @@ test('npm whoami with basic auth', function (t) {
t.equal(stderr, '', 'got nothing on stderr')
t.equal(code, 0, 'exit ok')
t.equal(stdout, 'wombat\n', 'got username')
- rimraf.sync(FIXTURE_PATH)
t.end()
}
)
@@ -41,7 +40,7 @@ test('npm whoami with bearer auth', { timeout: 2 * 1000 }, function (t) {
var s = '//localhost:' + common.port +
'/:_authToken = wombat-developers-union\n'
fs.writeFileSync(FIXTURE_PATH, s, 'ascii')
- fs.chmodSync(FIXTURE_PATH, '0444')
+ fs.chmodSync(FIXTURE_PATH, 0o644)
function verify (req, res) {
t.equal(req.method, 'GET')