Skip to content

Commit

Permalink
Fix regression tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Jan 3, 2025
1 parent f435534 commit 4b8a17e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/regressions/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const regressionFixtures: Fixture[] = [];

for (const path in globbedRegressionFixtures) {
const [suite, name] = path
.replace(/\\/g, '/')
.replace('./', '')
.replace(/\.\w+$/, '')
.split('/');
Expand Down Expand Up @@ -73,7 +74,8 @@ function excludeDemoFixture(suite: string, name: string, path: string) {

// Also use all public demos to avoid code duplication.
const globbedDemos = import.meta.glob<{ default: React.ComponentType<unknown> }>(
'docs/src/app/\\(public\\)/\\(content\\)/react/**/*.tsx',
// technically it should be 'docs/src/app/\\(public\\)/\\(content\\)/react/**/*.tsx' but tinyglobby doesn't resolve this on Windows
'docs/src/app/?public?/?content?/react/**/*.tsx',
);

const demoFixtures: Fixture[] = [];
Expand Down

0 comments on commit 4b8a17e

Please sign in to comment.