File tree Expand file tree Collapse file tree 6 files changed +49
-1
lines changed
Expand file tree Collapse file tree 6 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 1212 "cached-path-relative" : " ^1.0.0" ,
1313 "concat-stream" : " ~1.5.0" ,
1414 "defined" : " ^1.0.0" ,
15- "detective" : " ^4.0.0 " ,
15+ "detective" : " ^4.7.1 " ,
1616 "duplexer2" : " ^0.1.2" ,
1717 "inherits" : " ^2.0.1" ,
1818 "parents" : " ^1.0.0" ,
Original file line number Diff line number Diff line change 1+ module . exports = 'success' ;
Original file line number Diff line number Diff line change 1+ module . exports = 'success' ;
Original file line number Diff line number Diff line change 1+ module . exports = 'success' ;
Original file line number Diff line number Diff line change 1+ var foo = require ( './foo' ) ;
2+ var bar = require ( "./bar" ) ;
3+ var baz = require ( `./baz` ) ;
Original file line number Diff line number Diff line change 1+ var parser = require ( '../' ) ;
2+ var test = require ( 'tap' ) . test ;
3+ var fs = require ( 'fs' ) ;
4+ var path = require ( 'path' ) ;
5+
6+ var files = {
7+ main : path . join ( __dirname , '/files/quotes/main.js' ) ,
8+ foo : path . join ( __dirname , '/files/quotes/foo.js' ) ,
9+ bar : path . join ( __dirname , '/files/quotes/bar.js' ) ,
10+ baz : path . join ( __dirname , '/files/quotes/baz.js' )
11+ } ;
12+
13+ var sources = Object . keys ( files ) . reduce ( function ( acc , file ) {
14+ acc [ file ] = fs . readFileSync ( files [ file ] , 'utf8' ) ;
15+ return acc ;
16+ } , { } ) ;
17+
18+ test ( 'different quote styles' , function ( t ) {
19+ t . plan ( 1 ) ;
20+ var p = parser ( ) ;
21+ p . end ( files . main ) ;
22+ var main = null
23+
24+ p . on ( 'data' , function ( row ) {
25+ if ( row . id === files . main ) {
26+ main = row
27+ }
28+ } ) ;
29+ p . on ( 'end' , function ( ) {
30+ t . same ( main , {
31+ id : files . main ,
32+ file : files . main ,
33+ source : sources . main ,
34+ entry : true ,
35+ deps : {
36+ './foo' : files . foo ,
37+ './bar' : files . bar ,
38+ './baz' : files . baz
39+ }
40+ } ) ;
41+ } ) ;
42+ } ) ;
You can’t perform that action at this time.
0 commit comments