File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ const a = require ( 'a' ) ;
2+ const a = 0 ;
Original file line number Diff line number Diff line change 1+ var mdeps = require ( '../' ) ;
2+ var test = require ( 'tap' ) . test ;
3+ var JSONStream = require ( 'JSONStream' ) ;
4+ var packer = require ( 'browser-pack' ) ;
5+ var through = require ( 'through2' ) ;
6+ var path = require ( 'path' ) ;
7+
8+ test ( 'syntax error' , function ( t ) {
9+ t . plan ( 1 ) ;
10+ // ensure transformDeps functionality does not break when parse errors happen
11+ // see https://github.com/browserify/module-deps/commit/9fe46d5#commitcomment-28273437
12+ var p = mdeps ( {
13+ transform : function ( ) { return through ( ) ; }
14+ } ) ;
15+ p . on ( 'error' , function ( err ) {
16+ t . ok ( err ) ;
17+ } ) ;
18+ p . end ( path . join ( __dirname , '/files/syntax_error.js' ) ) ;
19+ } ) ;
You can’t perform that action at this time.
0 commit comments