Skip to content

Commit e226aae

Browse files
carderneTrigger.dev RepoOps
authored andcommitted
fix(tests): reduce React warnings and report replay output
Configure React act support in the webapp test setup and avoid duplicating successful-test console output when merging CI reports. Failed-test diagnostics and report results remain visible. Mono-RevId: e49c5f83c379abe5b5618d1aceeb519dfdad5359
1 parent ed40e0e commit e226aae

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/workflows/unit-tests-webapp.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,4 @@ jobs:
191191
merge-multiple: true
192192

193193
- name: Merge reports
194-
run: pnpm dlx vitest@"$(jq -r .devDependencies.vitest "$GITHUB_WORKSPACE/package.json")" run --merge-reports --pass-with-no-tests
194+
run: pnpm dlx vitest@"$(jq -r .devDependencies.vitest "$GITHUB_WORKSPACE/package.json")" run --merge-reports --reporter=default --silent=passed-only --pass-with-no-tests

‎apps/webapp/test/setup.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { vi } from "vitest";
22
import type * as IORedisModule from "ioredis";
33
import type * as TaskMetadataCacheModule from "~/services/taskMetadataCache.server";
44

5+
(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;
6+
57
// CI has no .env and no REDIS_HOST/REDIS_PORT, so import-time guards like
68
// autoIncrementCounter.server.ts throw and their suites fail to collect. Default
79
// the pair — the ioredis mock below forces lazyConnect, so nothing ever dials.

0 commit comments

Comments
 (0)