Skip to content

Commit 27d7564

Browse files
ZolotovDYZolotovDY
authored andcommitted
Added regression test for noParse option with relative paths
1 parent dac674a commit 27d7564

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

test/noparse.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,31 @@ test('noParse array', function (t) {
2929
t.deepEqual(actual, expected);
3030
});
3131
});
32+
33+
test('noParse array with relative paths', function (t) {
34+
process.chdir(__dirname);
35+
36+
t.plan(2);
37+
38+
var actual = [];
39+
var expected = [
40+
'noparse/a.js',
41+
'noparse/b.js',
42+
'noparse/dir1/1.js',
43+
'noparse/node_modules/robot/main.js'
44+
].map(function (x) {return path.resolve(x);}).sort();
45+
46+
var b = browserify({
47+
entries: [ __dirname + '/noparse/a.js' ],
48+
noParse: [
49+
path.join('noparse/dir1/1.js'),
50+
path.join('noparse/node_modules/robot/main.js')
51+
]
52+
});
53+
b.on('dep', function(dep) { actual.push(dep.file); });
54+
b.bundle(function (err, src) {
55+
actual.sort();
56+
t.ifError(err);
57+
t.deepEqual(actual, expected);
58+
});
59+
});

0 commit comments

Comments
 (0)