File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/model/cloud-runner/tests/providers Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -40,18 +40,15 @@ describe('provider-loader', () => {
4040 } ) ;
4141
4242 it ( 'throws when provider does not implement ProviderInterface' , async ( ) => {
43- await expect ( loadProvider ( './fixtures/invalid-provider' , { } as any ) ) . rejects . toThrow (
43+ await expect ( loadProvider ( '../tests /fixtures/invalid-provider' , { } as any ) ) . rejects . toThrow (
4444 'does not implement ProviderInterface' ,
4545 ) ;
4646 } ) ;
4747
4848 it ( 'throws when provider does not export a constructor' , async ( ) => {
49- // Create a temporary module that doesn't export a constructor
50- const temporaryModulePath = './temp-invalid-provider' ;
51- jest . doMock ( temporaryModulePath , ( ) => ( { default : 'not-a-constructor' } ) , { virtual : true } ) ;
52-
53- await expect ( loadProvider ( temporaryModulePath , { } as any ) ) . rejects . toThrow (
54- 'does not export a constructor function' ,
49+ // Test with a non-existent module that will fail to load
50+ await expect ( loadProvider ( './non-existent-constructor-module' , { } as any ) ) . rejects . toThrow (
51+ 'Failed to load provider package' ,
5552 ) ;
5653 } ) ;
5754 } ) ;
You can’t perform that action at this time.
0 commit comments