@@ -7,7 +7,7 @@ const __dirname = import.meta.dirname;
77
88test . beforeEach ( async ( t ) => {
99 t . context . mkdirpStub = sinon . stub ( ) . resolves ( ) ;
10- t . context . rimrafStub = sinon . stub ( ) . resolves ( ) ;
10+ t . context . rmrfStub = sinon . stub ( ) . resolves ( ) ;
1111
1212 t . context . lockStub = sinon . stub ( ) ;
1313 t . context . unlockStub = sinon . stub ( ) ;
@@ -16,10 +16,8 @@ test.beforeEach(async (t) => {
1616
1717 t . context . AbstractResolver = await esmock . p ( "../../../../lib/ui5Framework/AbstractInstaller.js" , {
1818 "../../../../lib/utils/fs.js" : {
19- mkdirp : t . context . mkdirpStub
20- } ,
21- "rimraf" : {
22- rimraf : t . context . rimrafStub
19+ mkdirp : t . context . mkdirpStub ,
20+ rmrf : t . context . rmrfStub
2321 } ,
2422 "lockfile" : {
2523 lock : t . context . lockStub ,
@@ -29,10 +27,8 @@ test.beforeEach(async (t) => {
2927 t . context . Installer = await esmock . p ( "../../../../lib/ui5Framework/npm/Installer.js" , {
3028 "../../../../lib/ui5Framework/AbstractInstaller.js" : t . context . AbstractResolver ,
3129 "../../../../lib/utils/fs.js" : {
32- mkdirp : t . context . mkdirpStub
33- } ,
34- "rimraf" : {
35- rimraf : t . context . rimrafStub
30+ mkdirp : t . context . mkdirpStub ,
31+ rmrf : t . context . rmrfStub
3632 } ,
3733 "graceful-fs" : {
3834 rename : t . context . renameStub ,
@@ -512,7 +508,7 @@ test.serial("Installer: installPackage with new package", async (t) => {
512508 "_packageJsonExists should be called with the correct arguments" ) ;
513509 t . is ( pathExistsStub . getCall ( 1 ) . args [ 0 ] , targetDir ,
514510 "_packageJsonExists should be called with the correct arguments" ) ;
515- t . is ( t . context . rimrafStub . callCount , 0 , "rimraf should never be called" ) ;
511+ t . is ( t . context . rmrfStub . callCount , 0 , "rmrf should never be called" ) ;
516512
517513 t . is ( extractPackageStub . callCount , 1 , "_extractPackage should be called once" ) ;
518514
@@ -577,7 +573,7 @@ test.serial("Installer: installPackage with already installed package", async (t
577573 t . is ( t . context . unlockStub . callCount , 0 , "unlock should never be called" ) ;
578574 t . is ( getStagingDirForPackageStub . callCount , 0 , "_getStagingDirForPackage should never be called" ) ;
579575 t . is ( pathExistsStub . callCount , 0 , "_pathExists should never be called" ) ;
580- t . is ( t . context . rimrafStub . callCount , 0 , "rimraf should never be called" ) ;
576+ t . is ( t . context . rmrfStub . callCount , 0 , "rmrf should never be called" ) ;
581577 t . is ( extractPackageStub . callCount , 0 , "_extractPackage should never be called" ) ;
582578 t . is ( t . context . mkdirpStub . callCount , 0 , "mkdirp should never be called" ) ;
583579 t . is ( t . context . renameStub . callCount , 0 , "fs.rename should never be called" ) ;
@@ -633,7 +629,7 @@ test.serial("Installer: installPackage with install already in progress", async
633629 t . is ( t . context . lockStub . callCount , 1 , "lock should be called once" ) ;
634630 t . is ( t . context . unlockStub . callCount , 1 , "unlock should be called once" ) ;
635631
636- t . is ( t . context . rimrafStub . callCount , 0 , "rimraf should never be called" ) ;
632+ t . is ( t . context . rmrfStub . callCount , 0 , "rmrf should never be called" ) ;
637633
638634 t . is ( t . context . mkdirpStub . callCount , 1 , "mkdirp should be called once" ) ;
639635 t . is ( t . context . mkdirpStub . getCall ( 0 ) . args [ 0 ] , path . join ( "/" , "ui5Data" , "framework" , "locks" ) ,
@@ -709,11 +705,11 @@ test.serial("Installer: installPackage with new package and existing target and
709705 t . is ( pathExistsStub . getCall ( 1 ) . args [ 0 ] , targetDir ,
710706 "_packageJsonExists should be called with the correct arguments" ) ;
711707
712- t . is ( t . context . rimrafStub . callCount , 2 , "rimraf should be called twice" ) ;
713- t . is ( t . context . rimrafStub . getCall ( 0 ) . args [ 0 ] , "staging-dir-path" ,
714- "rimraf should be called with the correct arguments" ) ;
715- t . is ( t . context . rimrafStub . getCall ( 1 ) . args [ 0 ] , targetDir ,
716- "rimraf should be called with the correct arguments" ) ;
708+ t . is ( t . context . rmrfStub . callCount , 2 , "rmrf should be called twice" ) ;
709+ t . is ( t . context . rmrfStub . getCall ( 0 ) . args [ 0 ] , "staging-dir-path" ,
710+ "rmrf should be called with the correct arguments" ) ;
711+ t . is ( t . context . rmrfStub . getCall ( 1 ) . args [ 0 ] , targetDir ,
712+ "rmrf should be called with the correct arguments" ) ;
717713
718714 t . is ( extractPackageStub . callCount , 1 , "_extractPackage should be called once" ) ;
719715
0 commit comments