Skip to content

Commit 8383ca4

Browse files
Test: Enforce Vitest conventions and CI guardrails (#81040)
* Test: Enforce Vitest conventions * Test: Run Vitest guardrails in CI * Test: Enforce Vitest style environment boundaries * Test: Enforce Vitest environment policy * Test: Harden Vitest convention guardrails * Test: Refine Vitest convention validation * Test: Simplify Vitest policy validation * Test: Refine Vitest environment policy * Test: Keep Vitest typechecks workspace-local * CI: Reuse static checks for Vitest conventions * Test: Resolve Vitest policy bindings * Test: Complete Vitest policy reference tracking * Test: Preserve Vitest policy identities * Test: Run Vitest typechecks through Node * Test: Track Testing Library query collections * Test: Reuse Vitest typecheck configs * Test: Track Testing Library query containers * Test: Support TypeScript 6 policy parsing * Test: Allow type-only browser API references * Test: Track inline Testing Library queries * Test: Track Testing Library collection elements * Test: Require runtime Vitest API imports * Test: Require Vitest collector imports * Test: Track DOM collection callbacks * Test: Close Vitest policy value-flow gaps * Test: Resolve DOM callback bindings * Test: Track DOM callback aliases * Test: Track conditional DOM callbacks * Test: Resolve DOM callbacks at call sites * Test: Refine DOM callback reachability * Test: Handle unbound callback this values * Update TypeScript ESLint parser dependency --- Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
1 parent 4027b4d commit 8383ca4

15 files changed

Lines changed: 3645 additions & 19 deletions

‎.github/workflows/static-checks.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ jobs:
124124
- name: Build packages
125125
run: npm run build
126126

127+
- name: Validate Vitest conventions and TypeScript test graph
128+
run: npm run test:unit:conventions
129+
127130
- name: Check type declaration files
128131
# Runs against the final package output, including the built
129132
# declarations and runtime files.

‎.github/workflows/unit-test.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ jobs:
109109
--ci \
110110
--maxWorkers="$(nproc)" \
111111
--shard="$SHARD" \
112-
--cacheDirectory="$HOME/.jest-cache"
112+
--cacheDirectory="$HOME/.jest-cache" \
113+
--passWithNoTests
113114
114115
- name: Run the migrated Vitest partition
115116
env:

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ yarn.lock
3434

3535
.eslintcache
3636
*.tsbuildinfo
37+
/test/unit/.vitest-*-typecheck.json
3738

3839
# Generated native views of repository agent skills
3940
/.claude/skills/

0 commit comments

Comments
 (0)