Skip to content

Commit e6686e4

Browse files
committed
m
1 parent 9b84c58 commit e6686e4

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/model/cloud-runner/tests/providers/provider-loader.test.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)