@@ -76,7 +76,8 @@ async function run(flags, args, name, checkInstalled, beforeInstall) {
76
76
}
77
77
78
78
async function getPackageVersion ( config , packagePath ) {
79
- return JSON . parse ( await fs . readFile ( path . join ( config . cwd , `node_modules/${ packagePath } /package.json` ) ) ) . version ;
79
+ return JSON . parse ( await fs . readFile (
80
+ path . join ( config . cwd , `node_modules/${ packagePath } /package.json` ) ) ) . version ;
80
81
}
81
82
82
83
test ( "root install from shrinkwrap" , ( ) => {
@@ -653,7 +654,7 @@ test.skip("install --save should add missing deps to fbkpm and mirror (PR import
653
654
let cwd = path . join ( fixturesLoc , fixture ) ;
654
655
await fs . copy ( path . join ( cwd , "fbkpm.lock.before" ) , path . join ( cwd , "fbkpm.lock" ) ) ;
655
656
656
- return run ( { save : true } , [ ] , fixture , async ( config , reporter ) => {
657
+ return run ( { save : true } , [ ] , fixture , async ( config ) => {
657
658
assert . equal ( await getPackageVersion ( config , "mime-types" ) , "2.0.0" ) ;
658
659
assert ( semver . satisfies ( await getPackageVersion ( config , "mime-db" ) , "~1.0.1" ) ) ;
659
660
assert . equal ( await getPackageVersion ( config , "fake-fbkpm-dependency" ) , "1.0.1" ) ;
@@ -678,7 +679,8 @@ test.skip("install --save should add missing deps to fbkpm and mirror (PR import
678
679
} ) ;
679
680
680
681
// TODO https://github.com/facebook/fbkpm/issues/78
681
- test . skip ( "install --save should update a dependency to fbkpm and mirror (PR import scenario 2)" , async ( ) => {
682
+ test . skip ( "install --save should update a dependency to fbkpm and mirror (PR import scenario 2)" ,
683
+ async ( ) => {
682
684
// mime-types@2.0.0 is saved in local mirror and gets updated to mime-types@2.1.11 via
683
685
// a change in package.json,
684
686
// files in mirror, fbkpm.lock, package.json and node_modules should reflect that
@@ -741,7 +743,7 @@ test("install --initMirror should add init mirror deps from package.json", async
741
743
let fixture = "install-init-mirror" ;
742
744
743
745
// initMirror gets converted to save flag in cli/install.js
744
- return run ( { save : true } , [ ] , fixture , async ( config , reporter ) => {
746
+ return run ( { save : true } , [ ] , fixture , async ( config ) => {
745
747
assert . equal ( await getPackageVersion ( config , "mime-types" ) , "2.0.0" ) ;
746
748
assert ( semver . satisfies ( await getPackageVersion ( config , "mime-db" ) , "~1.0.1" ) ) ;
747
749
0 commit comments