Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2015-09-20 01:09:24 +0300
committerRebecca Turner <me@re-becca.org>2015-09-25 01:53:12 +0300
commit829921fac2790f103035a34042b85181d9db1307 (patch)
treed37704d653aa791b611215ed905458d9950063b3 /test
parentbef06f55b0ac23fa9277ed3680e7cfbb6df21caa (diff)
validate-tree: When normalize-package-data throws, capture that as a warning
PR-URL: https://github.com/npm/npm/pull/9741
Diffstat (limited to 'test')
-rw-r--r--test/tap/normalize-package-explode.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/tap/normalize-package-explode.js b/test/tap/normalize-package-explode.js
new file mode 100644
index 000000000..57faec8b6
--- /dev/null
+++ b/test/tap/normalize-package-explode.js
@@ -0,0 +1,26 @@
+'use strict'
+var test = require('tap').test
+var log = require('npmlog')
+var npm = require('../../lib/npm.js')
+
+var idealTree = {
+ package: {
+ name: 'a b c',
+ version: '3.what'
+ },
+ children: [],
+ warnings: []
+}
+
+test('setup', function (t) {
+ npm.load({}, t.end)
+})
+
+test('validate-tree', function (t) {
+ log.disableProgress()
+ var validateTree = require('../../lib/install/validate-tree.js')
+ validateTree(idealTree, log.newGroup('validate'), function (er) {
+ t.pass("we didn't crash")
+ t.end()
+ })
+})