summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/legacy-private.js
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2016-03-29 23:30:51 -0700
committerMyles Borins <mborins@us.ibm.com>2016-04-01 14:47:39 -0700
commit0928584444ac6edf1ead0b93c9d05b1124183702 (patch)
treef64c5646b8e2817009e7afe97c2670c73d38a7eb /deps/npm/test/tap/legacy-private.js
parent39de601e1c3eda92eb2e37eca4e6aa960f206f39 (diff)
downloadnode-new-0928584444ac6edf1ead0b93c9d05b1124183702.tar.gz
deps: upgrade npm to 3.8.3
PR-URL: https://github.com/npm/node/pull/6 Reviewed-By: Evan Lucas <evanlucas@me.com>
Diffstat (limited to 'deps/npm/test/tap/legacy-private.js')
-rw-r--r--deps/npm/test/tap/legacy-private.js58
1 files changed, 58 insertions, 0 deletions
diff --git a/deps/npm/test/tap/legacy-private.js b/deps/npm/test/tap/legacy-private.js
new file mode 100644
index 0000000000..5e7817bf6a
--- /dev/null
+++ b/deps/npm/test/tap/legacy-private.js
@@ -0,0 +1,58 @@
+'use strict'
+var test = require('tap').test
+var common = require('../common-tap.js')
+var path = require('path')
+var rimraf = require('rimraf')
+var mkdirp = require('mkdirp')
+var basepath = path.resolve(__dirname, path.basename(__filename, '.js'))
+var fixturepath = path.resolve(basepath, 'npm-test-private')
+var modulepath = path.resolve(basepath, 'node_modules')
+var Tacks = require('tacks')
+var File = Tacks.File
+var Dir = Tacks.Dir
+
+var fixture = new Tacks(
+ Dir({
+ README: File(
+ 'just an npm test\n'
+ ),
+ 'package.json': File({
+ name: 'npm-test-private',
+ version: '9.9.9-9',
+ homepage: 'http://www.youtube.com/watch?v=1MLry6Cn_D4',
+ private: 'true'
+ })
+ })
+)
+
+test('setup', function (t) {
+ setup()
+ t.done()
+})
+
+test('private', function (t) {
+ common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest)
+ function installCheckAndTest (err, code, stdout, stderr) {
+ if (err) throw err
+ console.error(stderr)
+ console.log(stdout)
+ t.is(code, 0, 'install went ok')
+ t.done()
+ }
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.done()
+})
+
+function setup () {
+ cleanup()
+ fixture.create(fixturepath)
+ mkdirp.sync(modulepath)
+}
+
+function cleanup () {
+ fixture.remove(fixturepath)
+ rimraf.sync(basepath)
+}