Skip to content

Commit 27af851

Browse files
committed
docs(tests): explain why the search-replace registry opt-outs are load-bearing
Review read the missing direct import of @/tools/registry as evidence the vi.unmock calls were no-ops. They are not: the dependency is transitive — the search-replace planner resolves tool input params through real subblock configs — and removing both opt-outs fails 8 tests across the two suites. Comment now says that, so the next reader does not delete them.
1 parent 36550a1 commit 27af851

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

apps/sim/lib/workflows/search-replace/indexer.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ import {
1111
import { WORKFLOW_SEARCH_SUBFLOW_FIELD_IDS } from '@/lib/workflows/search-replace/subflow-fields'
1212

1313
/**
14-
* Uses the real tool registry: these assertions are about tool registration and
15-
* params, which the global `@/tools/registry` mock in vitest.setup.ts empties.
14+
* Uses the real tool registry. Nothing here imports it directly — the dependency
15+
* is transitive: the search-replace planner resolves tool input params through
16+
* real subblock configs, so the global `@/tools/registry` mock in
17+
* vitest.setup.ts empties the data these assertions read.
18+
*
19+
* Not a no-op, despite the lack of a direct import. Dropping this opt-out fails
20+
* 8 tests across this file and its sibling suite.
1621
*/
1722
vi.unmock('@/tools/registry')
1823

apps/sim/lib/workflows/search-replace/replacements.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ import {
1111
import { WORKFLOW_SEARCH_SUBFLOW_FIELD_IDS } from '@/lib/workflows/search-replace/subflow-fields'
1212

1313
/**
14-
* Uses the real tool registry: these assertions are about tool registration and
15-
* params, which the global `@/tools/registry` mock in vitest.setup.ts empties.
14+
* Uses the real tool registry. Nothing here imports it directly — the dependency
15+
* is transitive: the search-replace planner resolves tool input params through
16+
* real subblock configs, so the global `@/tools/registry` mock in
17+
* vitest.setup.ts empties the data these assertions read.
18+
*
19+
* Not a no-op, despite the lack of a direct import. Dropping this opt-out fails
20+
* 8 tests across this file and its sibling suite.
1621
*/
1722
vi.unmock('@/tools/registry')
1823

0 commit comments

Comments
 (0)