Skip to content

Commit

Permalink
Eliminate isarray dep
Browse files Browse the repository at this point in the history
It's now only being used in a test to generically test bundling and
exposing a module, so another module is substituted and serves the
same purpose.
  • Loading branch information
jmm committed May 6, 2016
1 parent 0106bd3 commit 14e92f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"coffee-script": "~1.10.0",
"coffeeify": "~1.1.0",
"es6ify": "~0.4.8",
"isarray": "^1.0.0",
"isstream": "^0.1.2",
"seq": "0.3.5",
"tap": "^2.2.0",
Expand Down
18 changes: 9 additions & 9 deletions test/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('array add', function (t) {
t.plan(expected.length);

var b = browserify();
var files = [
var files = [
__dirname + '/array/one.js',
__dirname + '/array/two.js',
__dirname + '/array/three.js'
Expand All @@ -25,14 +25,14 @@ test('array require', function (t) {
t.plan(3);

var b = browserify();
var files = [ 'isarray', 'subarg' ];
var files = [ 'defined', 'subarg' ];
b.require(files);
b.bundle(function (err, src) {
var c = {};
vm.runInNewContext(src, c);
t.equal(c.require('isarray')([]), true);
t.equal(c.require('isarray')({}), false);

t.equal(c.require('defined')(undefined, true), true);
t.equal(c.require('defined')(undefined, false), false);
t.deepEqual(c.require('subarg')(['-x', '3']), { x: 3, _: [] });
});
});
Expand All @@ -42,16 +42,16 @@ test('array require opts', function (t) {

var b = browserify();
var files = [
{ file: require.resolve('isarray'), expose: 'abc' },
{ file: require.resolve('defined'), expose: 'abc' },
{ file: require.resolve('subarg'), expose: 'def' }
];
b.require(files);
b.bundle(function (err, src) {
var c = {};
vm.runInNewContext(src, c);
t.equal(c.require('abc')([]), true);
t.equal(c.require('abc')({}), false);

t.equal(c.require('abc')(undefined, true), true);
t.equal(c.require('abc')(undefined, false), false);
t.deepEqual(c.require('def')(['-x', '3']), { x: 3, _: [] });
});
});
Expand Down

0 comments on commit 14e92f9

Please sign in to comment.