From e33d6d217936b9344ada7381868b72006bf48f4e Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Tue, 8 Oct 2024 10:12:05 +0200 Subject: [PATCH] fix test on windows --- tests/playwright-test/watch.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/playwright-test/watch.spec.ts b/tests/playwright-test/watch.spec.ts index c2ada12c41..2e5159b16b 100644 --- a/tests/playwright-test/watch.spec.ts +++ b/tests/playwright-test/watch.spec.ts @@ -842,6 +842,7 @@ test('should stop testrun on pressing escape', async ({ runWatchTest }) => { 'a.test.ts': ` import { test, expect } from '@playwright/test'; test('stalls', async () => { + console.log('test started') await new Promise(() => {}); }); `, @@ -850,8 +851,7 @@ test('should stop testrun on pressing escape', async ({ runWatchTest }) => { testProcess.clearOutput(); testProcess.write('\r\n'); - await testProcess.waitForOutput('Running 1 test'); - await timers.setTimeout(500); + await testProcess.waitForOutput('test started'); testProcess.write('\x1B'); await testProcess.waitForOutput('1 interrupted'); });