You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b2cd2a9
Browse filesBrowse the repository at this point in the historyBrowse files
chore(tests): tighten check:test-patterns and shrink its baseline (#8886)
* chore(tests): tighten check:test-patterns and shrink its baseline
- Exempt *.live.test.ts from global-remock and local-factory: live suites bind
real boundaries (real Postgres via a re-mocked @sim/db).
- Fail when a central mock vi.mocks an @/ module id that no longer resolves;
repoint copilot-http to @/lib/mothership/request/http (renamed in #8208)
and drop executor.mock's mocks of deleted modules. The check also scans
vitest.setup.ts, whose mock and alias of the deleted @/stores/console/store
are removed.
- Gate local-helper on the workspace depending on @sim/testing.
- redundant-hook inspects every afterEach statement and the leading run of a
beforeEach (a later reset can deliberately discard setup's own calls).
- New module-scope-stub rule: module-scope vi.stubGlobal/stubEnv/spyOn is
undone before the first test; delete the six dead fetch stubs.
- Rewrite @sim/testing @example barrel imports to direct paths.
- Replace real sleeps with fake timers in file-doc-store and update-cost.
- Convert table-constants and sim-search-connectors local factories to the
central mocks; fold v1-route's subscription/rate-limiter duplicates into
billingSubscriptionMock/rateLimiterMock.
Baseline: 140 -> 92 entries.
* fix(tests): catch exported and type-asserted module-scope stubs, and cover the stub and hook rules with fixtures
0 commit comments