summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/ls-depth-unmet.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/tap/ls-depth-unmet.js')
-rw-r--r--deps/npm/test/tap/ls-depth-unmet.js51
1 files changed, 25 insertions, 26 deletions
diff --git a/deps/npm/test/tap/ls-depth-unmet.js b/deps/npm/test/tap/ls-depth-unmet.js
index 1ac85efc94..37a0cb5fea 100644
--- a/deps/npm/test/tap/ls-depth-unmet.js
+++ b/deps/npm/test/tap/ls-depth-unmet.js
@@ -1,31 +1,30 @@
-var common = require('../common-tap')
- , test = require('tap').test
- , path = require('path')
- , rimraf = require('rimraf')
- , osenv = require('osenv')
- , mkdirp = require('mkdirp')
- , pkg = __dirname + '/ls-depth-unmet'
- , cache = pkg + '/cache'
- , tmp = pkg + '/tmp'
- , node = process.execPath
- , npm = path.resolve(__dirname, '../../cli.js')
- , mr = require('npm-registry-mock')
+var common = require("../common-tap")
+ , test = require("tap").test
+ , path = require("path")
+ , rimraf = require("rimraf")
+ , osenv = require("osenv")
+ , mkdirp = require("mkdirp")
+ , pkg = path.resolve(__dirname, "ls-depth-unmet")
+ , mr = require("npm-registry-mock")
, opts = {cwd: pkg}
+ , cache = path.resolve(pkg, "cache")
+ , tmp = path.resolve(pkg, "tmp")
+ , nodeModules = path.resolve(pkg, "node_modules")
function cleanup () {
process.chdir(osenv.tmpdir())
- rimraf.sync(pkg + '/cache')
- rimraf.sync(pkg + '/tmp')
- rimraf.sync(pkg + '/node_modules')
+ rimraf.sync(cache)
+ rimraf.sync(tmp)
+ rimraf.sync(nodeModules)
}
-test('setup', function (t) {
+test("setup", function (t) {
cleanup()
- mkdirp.sync(pkg + '/cache')
- mkdirp.sync(pkg + '/tmp')
+ mkdirp.sync(cache)
+ mkdirp.sync(tmp)
mr(common.port, function (s) {
- var cmd = ['install', 'underscore@1.3.1', 'mkdirp', 'test-package-with-one-dep', '--registry=' + common.registry]
+ var cmd = ["install", "underscore@1.3.1", "mkdirp", "test-package-with-one-dep", "--registry=" + common.registry]
common.npm(cmd, opts, function (er, c) {
if (er) throw er
t.equal(c, 0)
@@ -35,8 +34,8 @@ test('setup', function (t) {
})
})
-test('npm ls --depth=0', function (t) {
- common.npm(['ls', '--depth=0'], opts, function (er, c, out) {
+test("npm ls --depth=0", function (t) {
+ common.npm(["ls", "--depth=0"], opts, function (er, c, out) {
if (er) throw er
t.equal(c, 1)
t.has(out, /UNMET DEPENDENCY optimist@0\.6\.0/
@@ -53,8 +52,8 @@ test('npm ls --depth=0', function (t) {
})
})
-test('npm ls --depth=1', function (t) {
- common.npm(['ls', '--depth=1'], opts, function (er, c, out) {
+test("npm ls --depth=1", function (t) {
+ common.npm(["ls", "--depth=1"], opts, function (er, c, out) {
if (er) throw er
t.equal(c, 1)
t.has(out, /UNMET DEPENDENCY optimist@0\.6\.0/
@@ -71,10 +70,10 @@ test('npm ls --depth=1', function (t) {
})
})
-test('npm ls --depth=Infinity', function (t) {
+test("npm ls --depth=Infinity", function (t) {
// travis has a preconfigured depth=0, in general we can not depend
// on the default value in all environments, so explictly set it here
- common.npm(['ls', '--depth=Infinity'], opts, function (er, c, out) {
+ common.npm(["ls", "--depth=Infinity"], opts, function (er, c, out) {
if (er) throw er
t.equal(c, 1)
t.has(out, /UNMET DEPENDENCY optimist@0\.6\.0/
@@ -91,7 +90,7 @@ test('npm ls --depth=Infinity', function (t) {
})
})
-test('cleanup', function (t) {
+test("cleanup", function (t) {
cleanup()
t.end()
})