Skip to content

Commit

Permalink
failing node_modules test
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed May 10, 2011
1 parent c24d858 commit bf5c3c4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/modules.js
@@ -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 change: 1 addition & 0 deletions test/modules/foomoduletest/index.js
@@ -0,0 +1 @@
exports.bar = require('barmoduletest');

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions test/modules/foomoduletest/package.json
@@ -0,0 +1,8 @@
{
"name" : "foomoduletest",
"version" : "0.0.1",
"main" : "./index.js",
"dependencies" : {
"barmoduletest" : "=0.0.x"
}
}

0 comments on commit bf5c3c4

Please sign in to comment.