@@ -119,11 +119,11 @@ describe('pluginManager', () => {
119119 vi . spyOn ( pluginLoaders , 'loadPluginViaJsFile' ) . mockImplementation ( ( ) => Promise . resolve ( undefined ) )
120120
121121 pluginManager . clearCache ( )
122- await pluginManager . loadPluginsFromPath ( { pluginsPath : 'fake-path' } )
122+ await pluginManager . loadPluginsFromPath ( { pluginsPath : 'fake-path' } )
123123
124124 expect ( pluginManager . getPlugins ( ) . length ) . toBe ( 0 )
125- expect ( pluginLoaders . loadPluginViaJsFile ) . toHaveBeenCalledOnce ( ) ;
126- expect ( pluginLoaders . loadPluginViaTsFile ) . toHaveBeenCalledOnce ( ) ;
125+ expect ( pluginLoaders . loadPluginViaJsFile ) . toHaveBeenCalledOnce ( )
126+ expect ( pluginLoaders . loadPluginViaTsFile ) . toHaveBeenCalledOnce ( )
127127 expect ( core . info . mock . calls [ 0 ] [ 0 ] ) . toBe ( 'Skipping plugin without index.ts or index.js file: folder-a' )
128128 } )
129129 } )
@@ -133,14 +133,16 @@ describe('pluginManager', () => {
133133 sharedSetup ( )
134134 pluginManager . clearCache ( )
135135
136- vi . spyOn ( pluginLoaders , 'loadPluginViaTsFile' ) . mockImplementation ( ( ) => Promise . resolve ( { name : 'test-plugin' , default : vi . fn ( ) } ) )
136+ vi . spyOn ( pluginLoaders , 'loadPluginViaTsFile' ) . mockImplementation ( ( ) =>
137+ Promise . resolve ( { name : 'test-plugin' , default : vi . fn ( ) } ) ,
138+ )
137139 vi . spyOn ( pluginLoaders , 'loadPluginViaJsFile' ) . mockImplementation ( ( ) => Promise . resolve ( undefined ) )
138140
139- await pluginManager . loadPluginsFromPath ( { pluginsPath : 'fake-path' } )
141+ await pluginManager . loadPluginsFromPath ( { pluginsPath : 'fake-path' } )
140142
141143 expect ( pluginManager . getPlugins ( ) . length ) . toBe ( 1 )
142- expect ( pluginLoaders . loadPluginViaJsFile ) . not . toHaveBeenCalled ( ) ;
143- expect ( pluginLoaders . loadPluginViaTsFile ) . toHaveBeenCalledOnce ( ) ;
144+ expect ( pluginLoaders . loadPluginViaJsFile ) . not . toHaveBeenCalled ( )
145+ expect ( pluginLoaders . loadPluginViaTsFile ) . toHaveBeenCalledOnce ( )
144146 expect ( core . info . mock . calls [ 0 ] [ 0 ] ) . toBe ( 'Found plugin: test-plugin' )
145147 } )
146148 } )
@@ -151,16 +153,17 @@ describe('pluginManager', () => {
151153 pluginManager . clearCache ( )
152154
153155 vi . spyOn ( pluginLoaders , 'loadPluginViaTsFile' ) . mockImplementation ( ( ) => Promise . resolve ( undefined ) )
154- vi . spyOn ( pluginLoaders , 'loadPluginViaJsFile' ) . mockImplementation ( ( ) => Promise . resolve ( { name : 'test-plugin' , default : vi . fn ( ) } ) )
156+ vi . spyOn ( pluginLoaders , 'loadPluginViaJsFile' ) . mockImplementation ( ( ) =>
157+ Promise . resolve ( { name : 'test-plugin' , default : vi . fn ( ) } ) ,
158+ )
155159
156- await pluginManager . loadPluginsFromPath ( { pluginsPath : 'fake-path' } )
160+ await pluginManager . loadPluginsFromPath ( { pluginsPath : 'fake-path' } )
157161
158162 expect ( pluginManager . getPlugins ( ) . length ) . toBe ( 1 )
159- expect ( pluginLoaders . loadPluginViaJsFile ) . toHaveBeenCalledOnce ( ) ;
160- expect ( pluginLoaders . loadPluginViaTsFile ) . toHaveBeenCalledOnce ( ) ;
163+ expect ( pluginLoaders . loadPluginViaJsFile ) . toHaveBeenCalledOnce ( )
164+ expect ( pluginLoaders . loadPluginViaTsFile ) . toHaveBeenCalledOnce ( )
161165 expect ( core . info . mock . calls [ 0 ] [ 0 ] ) . toBe ( 'Found plugin: test-plugin' )
162166 } )
163167 } )
164168 } )
165-
166169} )
0 commit comments