Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

failing node_modules test

  • Loading branch information...
commit bf5c3c4b48f4cce1ae5f34862e8cf855df0e8208 1 parent c24d858
James Halliday authored
19 test/modules.js
View
@@ -0,0 +1,19 @@
+var assert = require('assert');
+var browserify = require('browserify');
+var vm = require('vm');
+var Hash = require('hashish');
+
+exports.modules = function () {
+ var src = browserify.bundle({
+ base : {
+ 'foomoduletest' : __dirname + '/modules/foomoduletest'
+ }
+ });
+
+ assert.ok(typeof src === 'string');
+ assert.ok(src.length > 0);
+
+ var c = {};
+ vm.runInNewContext(src, c);
+ assert.eql(c.require('foomoduletest').bar, 55)
+};
1  test/modules/foomoduletest/index.js
View
@@ -0,0 +1 @@
+exports.bar = require('barmoduletest');
1  test/modules/foomoduletest/node_modules/barmoduletest/bar.js
View
@@ -0,0 +1 @@
+module.exports = 55;
5 test/modules/foomoduletest/node_modules/barmoduletest/package.json
View
@@ -0,0 +1,5 @@
+{
+ "name" : "barmoduletest",
+ "version" : "0.0.1",
+ "main" : "./bar.js"
+}
8 test/modules/foomoduletest/package.json
View
@@ -0,0 +1,8 @@
+{
+ "name" : "foomoduletest",
+ "version" : "0.0.1",
+ "main" : "./index.js",
+ "dependencies" : {
+ "barmoduletest" : "=0.0.x"
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.