Repository navigation
Description
Problem
The TypeScript preview adapter parses test files before relation and oracle analysis, but crates/ripr/src/analysis/language/typescript/tests_extract.rs currently recognizes only:
test("name", callback)
it("name", callback)
test.each(table)("name", callback)
it.each(table)("name", callback)
describe("name", callback)
Common active Jest/Vitest declarations such as test.only(...), it.concurrent(...), test.sequential(...), describe.only(...), and array-form describe.each(table)(...) are therefore absent from TypeScriptTest discovery. A real test using one of those wrappers disappears before owner-relation or oracle classification can run, producing falsely weak or missing preview evidence.
This must not be fixed by accepting every member chain. Disabled or non-ordinary declarations such as test.skip, describe.skip, test.todo, conditional wrappers, and expected-failure wrappers do not establish an ordinary executable related-test path and must remain uncredited. Conversely, active modifier chains must not be rejected merely because a modifier repeats or active execution flags combine: chainable test APIs may accumulate those properties, and extraction does not own runner-specific precedence.
Current authority
extract_testsparses a test file and feeds discoveredTypeScriptTestvalues into the workspace-wide related-test index.describe_body_from_statementaccepts only a baredescribeidentifier.test_callee_is_identifieraccepts only baretest/itidentifiers.test_callee_is_eachaccepts only baretest.each/it.eacharray-call forms.related_test_candidatesandowner_call_relationconsume only tests that survived that extraction boundary.
Required outcome
Recognize a bounded active declaration grammar:
base = test | it | describe
active_modifier = only | concurrent | sequential
active_base = base | active_base.active_modifier
active_each = active_base.each(table)
Use the same grammar for test calls and suite recursion, while retaining the existing callback, assertion, import, mock, and qualified-name extraction. The bounded property vocabulary is the fail-closed boundary; repeated active properties and active-property combinations remain discoverable because extraction does not evaluate their runner-specific precedence.
Acceptance
-
test.only(...),it.concurrent(...), andtest.sequential(...)are extracted with their current body and assertion evidence. -
describe.only(...),describe.concurrent(...), anddescribe.sequential(...)recurse into nested tests and retain qualified suite names. - array-form
describe.each(table)(...)recurses into nested tests. - active modifier-before-
.eachforms such astest.only.each(table)(...)anddescribe.concurrent.each(table)(...)are recognized. - active modifiers may combine in either order, repeat, or coexist without extraction inventing runner-precedence semantics.
-
test.skip,describe.skip,test.todo, conditional wrappers, expected-failure wrappers, unknown roots, and unknown modifiers remain absent. - an extracted active test still reaches the production related-test relation path; syntax recognition alone does not upgrade relation or oracle strength.
- existing bare and array-form
.eachextraction remains unchanged.
Proof
cargo test -p ripr analysis::language::typescript::tests_extract_tests -- --test-threads=1
cargo test -p ripr analysis::language::typescript -- --test-threads=1
cargo xtask check-static-language
cargo xtask check-evidence-promotion-honesty
cargo xtask goldens check
git diff --checkNegative evidence
All-state PR search for describe.each, test.only, Vitest modifiers, and Jest modifiers found only the historical TypeScript decomposition PR #1151 and no implementation of this claim. Exact issue search returned no matching issue.
Non-goals
- tagged-template
.eachtables; - imported or renamed test API aliases;
- runtime test execution or proof that a focused/skipped declaration ran;
- runner-specific precedence among accumulated active flags;
- changes to relation scoring, oracle strength, actionability, output schemas, support tiers, or default gates;
- broad Jest/Vitest API coverage.
Claim boundary
Completion prevents active, statically explicit Jest/Vitest declarations from disappearing at the TypeScript extraction boundary. It does not establish runtime execution, coverage, mutation adequacy, runner-precedence semantics, or stronger evidence than the existing relation and oracle producers earn.
Activity