diff options
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client/test/star.js')
-rw-r--r-- | deps/npm/node_modules/npm-registry-client/test/star.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/test/star.js b/deps/npm/node_modules/npm-registry-client/test/star.js index 0e43e10d7..43c8888ef 100644 --- a/deps/npm/node_modules/npm-registry-client/test/star.js +++ b/deps/npm/node_modules/npm-registry-client/test/star.js @@ -2,18 +2,20 @@ var tap = require("tap") var server = require("./lib/server.js") var common = require("./lib/common.js") -var client = common.freshClient({ - username : "username", - password : "%1234@asdf%", - email : "ogd@aoaioxxysz.net", - _auth : new Buffer("username:%1234@asdf%").toString("base64"), - "always-auth" : true -}) - -var cache = require("./fixtures/underscore/cache.json") var DEP_USER = "username" +var nerfed = "//localhost:" + server.port + "/:" + +var configuration = {} +configuration[nerfed + "username"] = DEP_USER +configuration[nerfed + "_password"] = new Buffer("%1234@asdf%").toString("base64") +configuration[nerfed + "email"] = "i@izs.me" + +var client = common.freshClient(configuration) + +var cache = require("./fixtures/underscore/cache.json") + tap.test("star a package", function (t) { server.expect("GET", "/underscore?write=true", function (req, res) { t.equal(req.method, "GET") @@ -52,7 +54,7 @@ tap.test("star a package", function (t) { }) client.star("http://localhost:1337/underscore", true, function (error, data) { - t.notOk(error, "no errors") + t.ifError(error, "no errors") t.ok(data.starred, "was starred") t.end() |