Skip to content

Commit 6002360

Browse files
committed
Fix extra server environment test assertion
1 parent ad3232d commit 6002360

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

integration/vite-extra-server-environment-test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { test, expect } from "@playwright/test";
22
import * as fs from "node:fs";
3+
import path from "node:path";
34

45
import { build, createProject, reactRouterConfig } from "./helpers/vite.js";
56

@@ -111,8 +112,8 @@ test("ignores external server environments without skipping React Router build h
111112
expect(status).toBe(0);
112113
expect(
113114
fs
114-
.readdirSync("build/client/assets")
115-
.filter((file) => file.startsWith("test-") && file.endsWith(".txt"))
115+
.readdirSync(path.join(cwd, "build/client/assets"))
116+
.filter((file) => /^test-.*\.txt$/.test(file))
116117
.length,
117118
).toBe(1);
118119
});

0 commit comments

Comments
 (0)