File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -551,20 +551,7 @@ describe('main', () => {
551551
552552 ( PluginManager as jest . Mock ) . mockImplementation ( ( ) => ( {
553553 install : jest . fn ( ) . mockResolvedValue ( undefined ) ,
554- require : jest . fn ( ) ,
555- getInfo : jest
556- . fn ( )
557- . mockReturnValue ( { location : path . join ( __dirname , 'path' , 'to' ) } ) ,
558- uninstallAll : jest . fn ( ) . mockResolvedValue ( undefined ) ,
559- } ) ) ;
560- } ) ;
561-
562- it ( 'should run package transform for single version' , async ( ) => {
563- jest . spyOn ( fs , 'existsSync' ) . mockReturnValue ( true ) ;
564- jest . mock (
565- mockMatchedPath ,
566- ( ) => ( {
567- __esModule : true ,
554+ require : ( ) => ( {
568555 default : {
569556 transforms : {
570557 '18.0.0' : 'mylib/path/to/18.js' ,
@@ -574,9 +561,15 @@ describe('main', () => {
574561 } ,
575562 } ,
576563 } ) ,
577- { virtual : true } ,
578- ) ;
564+ getInfo : jest
565+ . fn ( )
566+ . mockReturnValue ( { location : path . join ( __dirname , 'path' , 'to' ) } ) ,
567+ uninstallAll : jest . fn ( ) . mockResolvedValue ( undefined ) ,
568+ } ) ) ;
569+ } ) ;
579570
571+ it ( 'should run package transform for single version' , async ( ) => {
572+ jest . spyOn ( fs , 'existsSync' ) . mockReturnValue ( true ) ;
580573 await main ( [ mockPath ] , {
581574 packages : 'mylib@18.0.0' ,
582575 parser : 'babel' ,
You can’t perform that action at this time.
0 commit comments