File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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+ } ) ;
You can’t perform that action at this time.
0 commit comments