diff options
author | isaacs <i@izs.me> | 2012-03-13 01:27:34 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-03-13 01:27:34 +0400 |
commit | 28044f3a775e7ab1d66274731ad38496f5c6073d (patch) | |
tree | d9c8f92f07330a08bf9fa5873b0c6bbbf612d9e3 /test | |
parent | 4a312bec1d77944212f16372fd1af82d30b49c55 (diff) |
Fix cases where an optionalDependency fails to build
Diffstat (limited to 'test')
-rw-r--r-- | test/packages/npm-test-optional-deps/package.json | 4 | ||||
-rw-r--r-- | test/packages/npm-test-optional-deps/test.js | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/test/packages/npm-test-optional-deps/package.json b/test/packages/npm-test-optional-deps/package.json index ebcd56832..56c6f09ed 100644 --- a/test/packages/npm-test-optional-deps/package.json +++ b/test/packages/npm-test-optional-deps/package.json @@ -1,10 +1,12 @@ { "name": "npm-test-optional-deps" , "version": "1.2.5" +, "scripts": { "test": "node test.js" } , "optionalDependencies": { "npm-test-foobarzaaakakaka": "http://example.com/" , "dnode": "10.999.14234" - , "sax": "*" + , "sax": "0.3.5" , "999 invalid name": "1.2.3" , "glob": "some invalid version 99 #! $$ x y z" + , "npm-test-failer":"*" } } diff --git a/test/packages/npm-test-optional-deps/test.js b/test/packages/npm-test-optional-deps/test.js new file mode 100644 index 000000000..a6f4698b7 --- /dev/null +++ b/test/packages/npm-test-optional-deps/test.js @@ -0,0 +1,8 @@ +var fs = require("fs") +var assert = require("assert") +var path = require("path") + +// sax should be the only dep that ends up installed +assert.deepEquals(fs.readdirSync(path.resolve(__dirname, "node_modules") + ,["sax"])) +assert.equals(require("sax/package.json").version, "0.3.5") |