@@ -24,7 +24,7 @@ describe('executePlugin', () => {
2424 ReturnType < ( typeof runnerModule ) [ 'executePluginRunner' ] >
2525 > ;
2626
27- beforeAll ( ( ) => {
27+ beforeEach ( ( ) => {
2828 readRunnerResultsSpy = vi . spyOn ( runnerModule , 'readRunnerResults' ) ;
2929 executePluginRunnerSpy = vi . spyOn ( runnerModule , 'executePluginRunner' ) ;
3030 } ) ;
@@ -35,11 +35,6 @@ describe('executePlugin', () => {
3535 } ) ;
3636
3737 it ( 'should execute a valid plugin config and pass runner params' , async ( ) => {
38- const executePluginRunnerSpy = vi . spyOn (
39- runnerModule ,
40- 'executePluginRunner' ,
41- ) ;
42-
4338 await expect (
4439 executePlugin ( MINIMAL_PLUGIN_CONFIG_MOCK , {
4540 persist : { } ,
@@ -68,8 +63,6 @@ describe('executePlugin', () => {
6863 } ) ;
6964
7065 it ( 'should try to read cache if cache.read is true' , async ( ) => {
71- const readRunnerResultsSpy = vi . spyOn ( runnerModule , 'readRunnerResults' ) ;
72-
7366 const validRunnerResult = {
7467 duration : 0 , // readRunnerResults now automatically sets this to 0 for cache hits
7568 date : new Date ( ) . toISOString ( ) , // readRunnerResults sets this to current time
@@ -106,12 +99,6 @@ describe('executePlugin', () => {
10699 } ) ;
107100
108101 it ( 'should try to execute runner if cache.read is true and file not present' , async ( ) => {
109- const readRunnerResultsSpy = vi . spyOn ( runnerModule , 'readRunnerResults' ) ;
110- const executePluginRunnerSpy = vi . spyOn (
111- runnerModule ,
112- 'executePluginRunner' ,
113- ) ;
114-
115102 readRunnerResultsSpy . mockResolvedValue ( null ) ;
116103 const runnerResult = {
117104 duration : 1000 ,
0 commit comments