Skip to content

test-impact: a test helper is the route, not a test; far tests listed apart - #1845

Merged
swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
apps/javascript/test-impact-lists-non-tests-and-far-rout
Oct 2, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
apps/javascript/test-impact-lists-non-tests-and-far-rout

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor
  • A JS/TS function is no longer a test by its name, and a Python test_* function counts only in a module pytest collects, so test/helpers.js and tests/helpers.py no longer show up as "1 test".
  • impact marks each test with loads_change: whether its file, or the fixture/conftest files its runner loads, imports the changed file (through the import closure).
  • test-impact lists the files that load the change within 3 hops first. The rest (joined by a key or a registration, or reached only by a long route) follow under "further out", with their own run command.
  • imports_fact now resolves ESM imports written with their extension and workspace package specifiers. IMPACT_VERSION is 63.
  • The import-time hop no longer fires from the module that only declares a const the query asks about. This came up once .js imports resolved.
  • Cases: new javascript/a-helper-is-the-route-not-the-test, with a control for a workspace subpath import and a far-hop check. python/conftest-fixture is extended with a helper and a control.

Checked: plugin cases js 307/307, ts 258/258, py 292/292, java 331/331, cs 208/208; engine js 88/88. On a JS monorepo, test-impact for a handler-table module went from 25 files in one list (2 helpers) to 5 near + 22 further out, with no helpers. Probes 68/92 before and after, 0 changed. Edges unchanged (17170).

…tests listed apart

- A JavaScript / TypeScript function is never a test by its name (runners collect the callback handed to
  test()/it()), and a module-level Python test_* function counts only in a module pytest collects: a
  helper in test/helpers.js or tests/helpers.py was "1 test" in a file no runner collects.
- impact marks each test with loads_change: whether its file (or the fixture / conftest files its runner
  loads) imports the changed file, through the import closure.
- test-impact lists first the files that load the change within 3 hops, then "further out" the rest (a
  key or registration joins them, or the route is long), with its own run command.
- imports_fact resolves an ES module import written with its extension and a workspace package's
  specifier (package.json exports / main); IMPACT_VERSION 63.
- The import-time hop no longer fires from the module that merely declares a const asked about: its
  readers resolve, and every importer's module was listed again (exposed once .js imports resolved).

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 0df85ac into apps/integration-0.1.9 Oct 2, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the apps/javascript/test-impact-lists-non-tests-and-far-rout branch October 2, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant