From c81293254c327e8e565f5181c07d9a17f401bb73 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 25 Mar 2024 23:21:55 +0100 Subject: [PATCH] fix test on Windows --- tests/playwright-test/playwright.ct-build.spec.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/playwright-test/playwright.ct-build.spec.ts b/tests/playwright-test/playwright.ct-build.spec.ts index c4faeaed36..0f8b1bdff6 100644 --- a/tests/playwright-test/playwright.ct-build.spec.ts +++ b/tests/playwright-test/playwright.ct-build.spec.ts @@ -16,6 +16,7 @@ import { test, expect, playwrightCtConfigText } from './playwright-test-fixtures'; import fs from 'fs'; +import path from 'path'; test.describe.configure({ mode: 'parallel' }); @@ -183,11 +184,11 @@ test('should extract component list', async ({ runInlineTest }, testInfo) => { }, { id: expect.stringContaining('_one'), importSource: expect.stringContaining('.'), - filename: expect.stringContaining('one/one.spec.tsx'), + filename: expect.stringContaining(`one${path.sep}one.spec.tsx`), }, { id: expect.stringContaining('_two'), importSource: expect.stringContaining('.'), - filename: expect.stringContaining('two/two.spec.tsx'), + filename: expect.stringContaining(`two${path.sep}two.spec.tsx`), }]); for (const [, value] of Object.entries(metainfo.deps)) @@ -214,13 +215,13 @@ test('should extract component list', async ({ runInlineTest }, testInfo) => { expect.stringContaining('jsx-runtime.js'), expect.stringContaining('button.tsx'), ]], - [expect.stringContaining('one/index.tsx'), [ + [expect.stringContaining(`one${path.sep}index.tsx`), [ expect.stringContaining('jsx-runtime.js'), - expect.stringContaining('one/index.tsx'), + expect.stringContaining(`one${path.sep}index.tsx`), ]], - [expect.stringContaining('two/index.tsx'), [ + [expect.stringContaining(`two${path.sep}index.tsx`), [ expect.stringContaining('jsx-runtime.js'), - expect.stringContaining('two/index.tsx'), + expect.stringContaining(`two${path.sep}index.tsx`), ]], ]); });