Skip to content

TypeScript test selection misses excluded, bare-named and JavaScript tests, and Proxy traps; multi-graph --json is not JSON #1875

Description

@swapnilpaliwal-sd

Measured with a mutation oracle over 14 open-source TypeScript repositories (break one function, record which test files newly fail, compare each verb's selection with that truth), TypeScript test selection, impact and path missed tests in five recurring shapes:

  1. Tests the build tsconfig excludes are not in the graph. A config that leaves its tests to the runner (exclude: ["test/**", "**/*.spec.ts"]) makes every test file NO_PROGRAM_CLAIMS_FILE. On one repository the graph held 0 of 16 test files and every verb answered nothing.
  2. A test file named only test.ts is not a test. Tests written beside their module (src/<fn>/test.ts) are classified as plain functions; one repository had 0 of 288 test files recognised and test selection recall 0.
  3. --json is not JSON when a repository has several language graphs and none answers. path with no chain printed per-graph headers (══ typescript graph ══) under --json: 279 of 1244 answers could not be parsed, on every repository indexed as TypeScript + JavaScript.
  4. JavaScript tests of TypeScript source are never selected. .js tests importing .ts source sit in the JavaScript graph, which has no edge into the TypeScript one (two repositories: 73 of 95 and 284 of 557 failing test files were .js).
  5. What a Proxy handler's traps call is unreachable. new Proxy(target, handler) / Proxy.revocable(target, handler): the traps the runtime calls have no caller, so draft logic in a Proxy-based library is reached by no test.

Across the 14 repositories: impact recall 0.61 (macro), 54 mutants with an empty test selection, path found 507 of 674 failing-test-to-function chains.

Activity

  1. swapnilpaliwal-sd commented on Oct 9, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Fixed by #1874, merged into apps/integration-0.1.9. On the same 14 repositories: impact recall 0.61 → 0.81 (macro), empty selections 54 → 17, path 507 → 561 of 674 chains; precision unchanged (0.22 → 0.23). Each fix carries a check that fails without it.

    Not covered here, one repository each so far: calls through a require() namespace, React class lifecycle methods, a function reached only from a test runner's global setup, a middleware handed to a store as data, and a Proxy handler that is a class instance passed through a parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions