@@ -472,21 +472,21 @@ describe('dependencyTree', () => {
472
472
} ) ;
473
473
} ) ;
474
474
475
- describe ( " It uses package specific node_module directory when resolving package dependencies" , ( ) => {
475
+ describe ( ' It uses package specific node_module directory when resolving package dependencies' , ( ) => {
476
476
testTreesForFormat ( 'commonjs' ) ;
477
477
478
478
it ( 'It can find sub package in node module package' , ( ) => {
479
479
mockfs ( {
480
480
[ path . join ( __dirname , '/es6' ) ] : {
481
481
'module.entry.js' : 'import * as module from "parent_module_a"' ,
482
482
node_modules : { // eslint-disable-line camelcase
483
- ' parent_module_a' : {
483
+ parent_module_a : { // eslint-disable-line camelcase
484
484
'index.main.js' : 'import * as child_module from "child_node_module"; module.exports = child_module;' ,
485
485
'package.json' : '{ "main": "index.main.js"}' ,
486
- node_modules : {
487
- child_node_module : {
486
+ node_modules : { // eslint-disable-line camelcase
487
+ child_node_module : { // eslint-disable-line camelcase
488
488
'index.main.js' : 'module.exports = "child_node_module_of_parent_a"' ,
489
- 'package.json' : '{ "main": "index.main.js"}' ,
489
+ 'package.json' : '{ "main": "index.main.js"}'
490
490
}
491
491
}
492
492
}
@@ -506,23 +506,22 @@ describe('dependencyTree', () => {
506
506
assert . ok ( treeList . includes ( path . normalize ( `${ directory } /node_modules/parent_module_a/node_modules/child_node_module/index.main.js` ) ) ) ;
507
507
} ) ;
508
508
509
-
510
509
it ( 'it usues correct version of sub package in node module package' , ( ) => {
511
510
mockfs ( {
512
511
[ path . join ( __dirname , '/es6' ) ] : {
513
512
'module.entry.js' : 'import * as module from "parent_module_a"' ,
514
513
node_modules : { // eslint-disable-line camelcase
515
- child_node_module : {
514
+ child_node_module : { // eslint-disable-line camelcase
516
515
'index.main.js' : 'module.exports = "child_node_module"' ,
517
- 'package.json' : '{ "main": "index.main.js", "version": "2.0.0"}' ,
516
+ 'package.json' : '{ "main": "index.main.js", "version": "2.0.0"}'
518
517
} ,
519
- parent_module_a : {
518
+ parent_module_a : { // eslint-disable-line camelcase
520
519
'index.main.js' : 'import * as child_module from "child_node_module"; module.exports = child_module;' ,
521
520
'package.json' : '{ "main": "index.main.js"}' ,
522
- node_modules : {
523
- child_node_module : {
521
+ node_modules : { // eslint-disable-line camelcase
522
+ child_node_module : { // eslint-disable-line camelcase
524
523
'index.main.js' : 'module.exports = "child_node_module_of_parent_a"' ,
525
- 'package.json' : '{ "main": "index.main.js", "version": "1.0.0"}' ,
524
+ 'package.json' : '{ "main": "index.main.js", "version": "1.0.0"}'
526
525
}
527
526
}
528
527
}
@@ -541,10 +540,9 @@ describe('dependencyTree', () => {
541
540
542
541
assert . ok ( ! treeList . includes ( path . normalize ( `${ directory } /node_modules/child_node_module/index.main.js` ) ) ) ;
543
542
assert . ok ( treeList . includes ( path . normalize ( `${ directory } /node_modules/parent_module_a/node_modules/child_node_module/index.main.js` ) ) ) ;
544
-
545
543
} ) ;
546
- } )
547
-
544
+ } ) ;
545
+
548
546
describe ( 'module formats' , ( ) => {
549
547
describe ( 'amd' , ( ) => {
550
548
testTreesForFormat ( 'amd' ) ;
0 commit comments