diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-06-18 11:19:39 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-07-02 05:43:16 +0400 |
commit | 0689ba249b92b4c6279a26804c96af6f92b3a501 (patch) | |
tree | c1d56154d44ee0f25eefbd0bdc5c8c4413007721 /test | |
parent | 4441ea1ca17c584a12c266beacf4f9a77d763dfc (diff) |
use --scope to map scope to registry
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/config-meta.js | 3 | ||||
-rw-r--r-- | test/tap/install-at-locally.js | 1 | ||||
-rw-r--r-- | test/tap/install-save-exact.js | 1 | ||||
-rw-r--r-- | test/tap/install-save-prefix.js | 1 | ||||
-rw-r--r-- | test/tap/publish-scoped.js (renamed from test/tap/publish-organized.js) | 14 | ||||
-rw-r--r-- | test/tap/scoped-module-specifiers.js | 4 |
6 files changed, 11 insertions, 13 deletions
diff --git a/test/tap/config-meta.js b/test/tap/config-meta.js index b116ca8a0..94261e46b 100644 --- a/test/tap/config-meta.js +++ b/test/tap/config-meta.js @@ -20,7 +20,8 @@ var exceptions = [ path.resolve(lib, "config.js"), path.resolve(lib, "publish.js"), path.resolve(lib, "utils", "lifecycle.js"), - path.resolve(lib, "utils", "map-name-to-registry.js"), + path.resolve(lib, "utils", "map-to-registry.js"), + path.resolve(nm, "npm-registry-client", "lib", "publish.js"), path.resolve(nm, "npm-registry-client", "lib", "request.js") ] diff --git a/test/tap/install-at-locally.js b/test/tap/install-at-locally.js index 18ea6c3a6..f6290e108 100644 --- a/test/tap/install-at-locally.js +++ b/test/tap/install-at-locally.js @@ -1,7 +1,6 @@ var common = require('../common-tap.js') var test = require('tap').test var npm = require('../../') -var osenv = require('osenv') var path = require('path') var fs = require('fs') var rimraf = require('rimraf') diff --git a/test/tap/install-save-exact.js b/test/tap/install-save-exact.js index cf25b779b..c9f486660 100644 --- a/test/tap/install-save-exact.js +++ b/test/tap/install-save-exact.js @@ -1,7 +1,6 @@ var common = require('../common-tap.js') var test = require('tap').test var npm = require('../../') -var osenv = require('osenv') var path = require('path') var fs = require('fs') var rimraf = require('rimraf') diff --git a/test/tap/install-save-prefix.js b/test/tap/install-save-prefix.js index bbdeddf3f..0e78005b6 100644 --- a/test/tap/install-save-prefix.js +++ b/test/tap/install-save-prefix.js @@ -1,7 +1,6 @@ var common = require('../common-tap.js') var test = require('tap').test var npm = require('../../') -var osenv = require('osenv') var path = require('path') var fs = require('fs') var rimraf = require('rimraf') diff --git a/test/tap/publish-organized.js b/test/tap/publish-scoped.js index 8ed2fd57a..4e7d557ff 100644 --- a/test/tap/publish-organized.js +++ b/test/tap/publish-scoped.js @@ -1,4 +1,4 @@ -var fs = require('fs') +var fs = require("fs") var path = require("path") var test = require("tap").test @@ -6,8 +6,8 @@ var mkdirp = require("mkdirp") var rimraf = require("rimraf") var nock = require("nock") -var npm = require('../../') -var common = require('../common-tap.js') +var npm = require("../../") +var common = require("../common-tap.js") var pkg = path.join(__dirname, "prepublish_package") @@ -15,7 +15,6 @@ test("setup", function (t) { mkdirp(path.join(pkg, "cache"), next) function next () { - console.log("in next") process.chdir(pkg) fs.writeFile( path.join(pkg, "package.json"), @@ -40,9 +39,12 @@ test("npm publish should honor scoping", function (t) { var configuration = { cache : path.join(pkg, "cache"), loglevel : "silent", - registry : "http://nonexistent.lvh.me" + registry : "http://nonexistent.lvh.me", + "//localhost:1337/:_auth" : new Buffer("testuser:password", "utf8").toString("base64") } + npm.load(configuration, onload) + function onload (er) { t.ifError(er, "npm bootstrapped successfully") @@ -55,8 +57,6 @@ test("npm publish should honor scoping", function (t) { t.end() }) } - - npm.load(configuration, onload) }) test("cleanup", function(t) { diff --git a/test/tap/scoped-module-specifiers.js b/test/tap/scoped-module-specifiers.js index b58563eb0..4b8f105ec 100644 --- a/test/tap/scoped-module-specifiers.js +++ b/test/tap/scoped-module-specifiers.js @@ -2,7 +2,7 @@ var util = require("util") var test = require("tap").test -var isOrganized = require("../../lib/utils/is-organized.js") +var isScoped = require("../../lib/utils/is-scoped.js") function Config() { this._store = Object.create(null) @@ -52,7 +52,7 @@ test("recognizing organized URLs", function (t) { function canonicalize(spec) { var expanded = splitSpec(spec) - if (isOrganized(expanded.name)) { + if (isScoped(expanded.name)) { return util.format( "npm://%s/%s, v: %s", mapRegistry(config, expanded.name), |