diff --git a/packages/backend/src/managers/playground.spec.ts b/packages/backend/src/managers/playground.spec.ts index 1cee39755..3ff7df873 100644 --- a/packages/backend/src/managers/playground.spec.ts +++ b/packages/backend/src/managers/playground.spec.ts @@ -59,6 +59,7 @@ beforeEach(() => { }); test('startPlayground should fail if no provider', async () => { + mocks.postMessage.mockResolvedValue(undefined); mocks.getContainerConnections.mockReturnValue([]); await expect(manager.startPlayground('model1', '/path/to/model')).rejects.toThrowError( 'Unable to find an engine to start playground', @@ -66,6 +67,7 @@ test('startPlayground should fail if no provider', async () => { }); test('startPlayground should download image if not present then create container', async () => { + mocks.postMessage.mockResolvedValue(undefined); mocks.getContainerConnections.mockReturnValue([ { connection: { @@ -122,6 +124,7 @@ test('stopPlayground should fail if no playground is running', async () => { }); test('stopPlayground should stop a started playground', async () => { + mocks.postMessage.mockResolvedValue(undefined); mocks.getContainerConnections.mockReturnValue([ { connection: {