Skip to content

Commit b57d07e

Browse files
committed
npm-registry-couchapp@2.7.2
1 parent bf61c45 commit b57d07e

File tree

3 files changed

+55
-72
lines changed

3 files changed

+55
-72
lines changed

Diff for: package-lock.json

+39-52
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
"licensee": "^7.0.2",
273273
"marked": "^0.6.0",
274274
"marked-man": "^0.2.1",
275-
"npm-registry-couchapp": "^2.7.1",
275+
"npm-registry-couchapp": "^2.7.2",
276276
"npm-registry-mock": "^1.1.0",
277277
"require-inject": "^1.4.4",
278278
"sprintf-js": "^1.1.2",

Diff for: test/network/registry.js

+15-19
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// This verifies that the server-side stuff still works.
33

44
var common = require('../common-tap')
5-
var test = require('tap').test
5+
var t = require('tap')
66

77
var npmExec = require.resolve('../../bin/npm-cli.js')
88
var path = require('path')
@@ -17,16 +17,15 @@ if (v[0] === 0 && v[1] < 10) {
1717
process.versions.node
1818
)
1919
} else {
20-
which('couchdb', function (er) {
21-
if (er) {
22-
console.error('WARNING: need couch to run test: ' + er.message)
23-
} else {
24-
runTests()
25-
}
26-
})
20+
try {
21+
which.sync('couchdb')
22+
t.test(runTests)
23+
} catch (er) {
24+
console.error('WARNING: need couch to run test: ' + er.message)
25+
}
2726
}
2827

29-
function runTests () {
28+
function runTests (t) {
3029
var env = Object.assign({ TAP: 1 }, process.env)
3130
env.npm = npmExec
3231
// TODO: fix tap and / or nyc to handle nested invocations properly
@@ -39,10 +38,8 @@ function runTests () {
3938
common.npm(['install'], opts, function (err, code) {
4039
if (err) { throw err }
4140
if (code) {
42-
return test('need install to work', function (t) {
43-
t.fail('install failed with: ' + code)
44-
t.end()
45-
})
41+
t.fail('install failed with: ' + code)
42+
return t.end()
4643
} else {
4744
opts = {
4845
cwd: ca,
@@ -52,19 +49,18 @@ function runTests () {
5249
common.npm(['test', '--', '-Rtap', '--no-coverage'], opts, function (err, code) {
5350
if (err) { throw err }
5451
if (code) {
55-
return test('need test to work', function (t) {
56-
t.fail('test failed with: ' + code)
57-
t.end()
58-
})
52+
t.fail('test failed with: ' + code)
53+
return t.end()
5954
}
6055
opts = {
6156
cwd: ca,
6257
env: env,
6358
stdio: 'inherit'
6459
}
6560
common.npm(['prune', '--production'], opts, function (err, code) {
66-
if (err) { throw err }
67-
process.exit(code || 0)
61+
t.ifError(err)
62+
t.equal(code, 0)
63+
return t.end()
6864
})
6965
})
7066
}

0 commit comments

Comments
 (0)