summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/dedupe-scoped.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/tap/dedupe-scoped.js')
-rw-r--r--deps/npm/test/tap/dedupe-scoped.js69
1 files changed, 35 insertions, 34 deletions
diff --git a/deps/npm/test/tap/dedupe-scoped.js b/deps/npm/test/tap/dedupe-scoped.js
index dacf405fc..a093e1f8c 100644
--- a/deps/npm/test/tap/dedupe-scoped.js
+++ b/deps/npm/test/tap/dedupe-scoped.js
@@ -11,40 +11,6 @@ var modules = join(pkg, 'node_modules')
var EXEC_OPTS = { cwd: pkg }
-test('setup', function (t) {
- setup()
- t.end()
-})
-
-// we like the cars
-function ltrimm (l) { return l.trim() }
-
-test('dedupe finds the common scoped modules and moves it up one level', function (t) {
- common.npm(
- [
- 'find-dupes' // I actually found a use for this command!
- ],
- EXEC_OPTS,
- function (err, code, stdout, stderr) {
- t.ifError(err, 'successful dry run against fake install')
- t.notOk(code, 'npm ran without issue')
- t.notOk(stderr, 'npm printed no errors')
- t.same(
- stdout.trim().split('\n').map(ltrimm),
- [prolog].concat(body).map(ltrimm),
- 'got expected output'
- )
-
- t.end()
- }
- )
-})
-
-test('cleanup', function (t) {
- cleanup()
- t.end()
-})
-
var prolog = 'dedupe@0.0.0 ' + pkg
var body = function () {/*
├─┬ first@1.0.0
@@ -95,6 +61,41 @@ var secondUnique = {
'version': '1.2.0'
}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+// we like the cars
+function ltrimm (l) { return l.trim() }
+
+test('dedupe finds the common scoped modules and moves it up one level', function (t) {
+ common.npm(
+ [
+ 'find-dupes' // I actually found a use for this command!
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout, stderr) {
+ t.ifError(err, 'successful dry run against fake install')
+ t.notOk(code, 'npm ran without issue')
+ t.notOk(stderr, 'npm printed no errors')
+ t.same(
+ stdout.trim().split('\n').map(ltrimm),
+ [prolog].concat(body).map(ltrimm),
+ 'got expected output'
+ )
+
+ t.end()
+ }
+ )
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
function setup (cb) {
cleanup()