From db00c65a7265e5d71287d61ec16d7738718f212a Mon Sep 17 00:00:00 2001 From: Le Vivilet Date: Fri, 27 Dec 2024 14:10:35 +0100 Subject: [PATCH] test --- .../test-integration/test/PreviewProcessPortConflict.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/test-integration/test/PreviewProcessPortConflict.test.ts b/packages/test-integration/test/PreviewProcessPortConflict.test.ts index be6a7117..2c19dc2d 100644 --- a/packages/test-integration/test/PreviewProcessPortConflict.test.ts +++ b/packages/test-integration/test/PreviewProcessPortConflict.test.ts @@ -2,7 +2,7 @@ import { expect, test } from '@jest/globals' import getPort from 'get-port' import { createPreviewProcess } from '../src/parts/CreatePreviewProcess/CreatePreviewProcess.js' -test.skip('preview process - handles port already in use', async () => { +test('preview process - handles port already in use', async () => { const previewProcess1 = createPreviewProcess() const previewProcess2 = createPreviewProcess() const id1 = 1 @@ -13,9 +13,8 @@ test.skip('preview process - handles port already in use', async () => { await previewProcess1.invoke('WebViewServer.start', id1, port) await previewProcess2.invoke('WebViewServer.create', id2) - // TODO improve error message await expect(previewProcess2.invoke('WebViewServer.start', id2, port)).rejects.toThrow( - "Failed to start webview server: TypeError: Cannot read properties of undefined (reading 'server')", + `Failed to start webview server: Server error: Error: listen EADDRINUSE: address already in use :::${port}`, ) previewProcess1[Symbol.dispose]()