Skip to content
Browse files

test and fix for #133

  • Loading branch information...
1 parent 9187599 commit df1e9cedc1c0f979665eb797bb2025bbb213aa57 @alexstrat alexstrat committed Apr 24, 2012
Showing with 24 additions and 1 deletion.
  1. +1 −1 lib/wrap.js
  2. +23 −0 test/multi_ignore.js
View
2 lib/wrap.js
@@ -69,7 +69,7 @@ Wrap.prototype.ignore = function (files) {
this.ignoring = files.reduce(function (acc,x) {
acc[x] = true;
return acc;
- }, {});
+ }, this.ignoring);
return this;
};
View
23 test/multi_ignore.js
@@ -0,0 +1,23 @@
+var browserify = require('../');
+var test = require('tap').test;
+
+test('multi ignore', function (t) {
+
+ var bundle = browserify(__dirname + '/multi_entry/a.js', {
+ ignore : [
+ __dirname + '/multi_entry/b.js'
+ ]
+ });
+ t.ok(bundle.ignoring[__dirname + '/multi_entry/b.js']);
+
+ bundle.ignore(__dirname + '/multi_entry/c.js');
+ t.ok(bundle.ignoring[__dirname + '/multi_entry/b.js']);
+ t.ok(bundle.ignoring[__dirname + '/multi_entry/c.js']);
+
+ bundle.ignore(__dirname + '/multi_entry/d.js');
+ t.ok(bundle.ignoring[__dirname + '/multi_entry/b.js']);
+ t.ok(bundle.ignoring[__dirname + '/multi_entry/c.js']);
+ t.ok(bundle.ignoring[__dirname + '/multi_entry/d.js']);
+
+ t.end();
+});

0 comments on commit df1e9ce

Please sign in to comment.
Something went wrong with that request. Please try again.