1 var common = require("../common-tap.js")
2 var test = require("tap").test
3 var mr = require("npm-registry-mock")
5 test("cache add", function (t) {
6 setup(function (er, s) {
14 "--registry=http://localhost:1337/"
15 ], {}, function (er, c, so, se) {
17 t.ok(c, "got non-zero exit code")
18 t.equal(so, "", "nothing printed to stdout")
19 t.similar(se, /404 Not Found: superfoo/, "got expected error")
27 var s = require("http").createServer(function (req, res) {
29 res.end("{\"error\":\"not_found\"}\n")
31 s.listen(1337, function () {