Skip to content
This repository
Browse code

test and fix for #133

  • Loading branch information...
commit df1e9cedc1c0f979665eb797bb2025bbb213aa57 1 parent 9187599
Alexandre Lacheze alexstrat authored

Showing 2 changed files with 24 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/wrap.js
  2. +23 0 test/multi_ignore.js
2  lib/wrap.js
@@ -69,7 +69,7 @@ Wrap.prototype.ignore = function (files) {
69 69 this.ignoring = files.reduce(function (acc,x) {
70 70 acc[x] = true;
71 71 return acc;
72   - }, {});
  72 + }, this.ignoring);
73 73
74 74 return this;
75 75 };
23 test/multi_ignore.js
... ... @@ -0,0 +1,23 @@
  1 +var browserify = require('../');
  2 +var test = require('tap').test;
  3 +
  4 +test('multi ignore', function (t) {
  5 +
  6 + var bundle = browserify(__dirname + '/multi_entry/a.js', {
  7 + ignore : [
  8 + __dirname + '/multi_entry/b.js'
  9 + ]
  10 + });
  11 + t.ok(bundle.ignoring[__dirname + '/multi_entry/b.js']);
  12 +
  13 + bundle.ignore(__dirname + '/multi_entry/c.js');
  14 + t.ok(bundle.ignoring[__dirname + '/multi_entry/b.js']);
  15 + t.ok(bundle.ignoring[__dirname + '/multi_entry/c.js']);
  16 +
  17 + bundle.ignore(__dirname + '/multi_entry/d.js');
  18 + t.ok(bundle.ignoring[__dirname + '/multi_entry/b.js']);
  19 + t.ok(bundle.ignoring[__dirname + '/multi_entry/c.js']);
  20 + t.ok(bundle.ignoring[__dirname + '/multi_entry/d.js']);
  21 +
  22 + t.end();
  23 +});

0 comments on commit df1e9ce

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