Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"e2e": "playwright test",
"e2e:bundled-dev": "playwright test --config playwright.bundled-dev.config.ts",
"e2e:ui": "playwright test --ui",
"test:all": "npm run unit:ci && npm run e2e && npm run e2e:bundled-dev"
"test:all": "pnpm run unit:ci && pnpm run e2e && pnpm run e2e:bundled-dev"
},
"dependencies": {
"@solidjs/meta": "^0.29.4",
Expand Down
8 changes: 5 additions & 3 deletions apps/tests/src/e2e/hydration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ test.describe("SSR Hydration", () => {

await expect(output).toHaveText("0");

await button.click();

await expect(output).toHaveText("1");
// Retry until a click is handled post-hydration. Pre-hydration clicks are synchronous no-ops.
await expect(async () => {
await button.click();
await expect(output).toHaveText("1", { timeout: 1000 });
}).toPass({ timeout: 15000 });

expect(consoleErrors, "Expected no hydration mismatch errors in console").toEqual([]);
});
Expand Down
3 changes: 3 additions & 0 deletions apps/tests/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export default defineConfig({
},
},
plugins: [solid()],
optimizeDeps: {
include: ["@solidjs/testing-library"],
},
test: {
mockReset: true,
globals: true,
Expand Down
Loading