test: type runtime test filters - #3746
Conversation
PR #3743 merged before this type-only helper annotation reached the PR head. Deno infers the JavaScript helper's default include and exclude arrays as never[] without an exported contract, so TypeScript callers fail when passing the shared Deno-only string pattern list. Adding JSDoc on filterTestFiles records the runtime shape that the helper already accepts without changing behavior. Constraint: Follow-up is limited to tests/test-file-utils.mjs JSDoc typing for the runtime-test-filters diagnostic missed by merged #3743. Rejected: Changing tests/runtime-test-filters.test.ts call sites | would hide the helper's exported type gap instead of fixing it. Rejected: Rewriting the helper in TypeScript | unnecessary and broader than a type-only repair. Confidence: high Scope-risk: narrow Directive: Keep filterTestFiles include and exclude filters typed as string-array glob patterns for all runtime test runners. Tested: deno 2.7.7 check tests/runtime-test-filters.test.ts Tested: deno 2.7.7 test tests/runtime-test-filters.test.ts with repo preload and runtime env Tested: deno 2.7.7 task fmt:check; deno 2.7.7 task lint:ci; deno 2.7.7 task typecheck Not-tested: External CI before draft PR creation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change adds JSDoc documentation for the exported ChangesTest file utility documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized JSDoc change clarifies test filter types without changing runtime behavior; the reported checks pass, so no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
📦 Client bundle boundary
A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in |
Summary
filterTestFilesso TypeScript callers seeincludeandexcludeasstring[]filters.deno check tests/runtime-test-filters.test.tsdiagnostic that PR fix(server): restrict project chooser to trusted loopback requests #3743 missed because it merged before the type-only helper commit landed.Verification
deno check tests/runtime-test-filters.test.tsfailed attests/runtime-test-filters.test.ts:39:53and:45:52withstring[]not assignable tonever[].Deno 2.7.7 deno check tests/runtime-test-filters.test.ts.1 passed (4 steps), 0 failed.deno task fmt:check,deno task lint:ci,deno task typecheck.src/agent/runtime/project-files-client.test.tsandsrc/react/compat/ssr-adapter/stream-renderer.test.ts; both exact files passed on direct rerun. Second full.husky/pre-pushrun passed withAll pre-push checks passed!.Final readiness
d23d0694eaf58693bc5a502dde3ac087c2e8e4c8.Summary by CodeRabbit