Context: --include-tests walks each changed file and tries to find an adjacent test file. The detection rules live in guessTestSiblings() in src/pack.js.
Today it covers JS/TS (foo.ts ↔ foo.test.ts, foo.spec.ts, __tests__/foo.test.ts) and Python (foo.py ↔ test_foo.py).
Goal: add the common test-naming conventions for:
- Java —
Foo.java ↔ FooTest.java (in the same dir, or under src/test/java/...)
- Rust —
foo.rs ↔ tests/foo.rs and the convention of #[cfg(test)] blocks at the bottom of the file (we don't need to extract the test block; just include the file)
- C# —
Foo.cs ↔ FooTests.cs
Acceptance:
- Each language returns plausible test paths from
guessTestSiblings()
- Returned paths are filtered against actual files-on-disk before being included (this already happens in the caller)
- No tests added — verify by running
node bin/prpack.js --include-tests on a small fixture and checking the output
Comment here before you start so we don't duplicate work.
Context:
--include-testswalks each changed file and tries to find an adjacent test file. The detection rules live inguessTestSiblings()in src/pack.js.Today it covers JS/TS (
foo.ts↔foo.test.ts,foo.spec.ts,__tests__/foo.test.ts) and Python (foo.py↔test_foo.py).Goal: add the common test-naming conventions for:
Foo.java↔FooTest.java(in the same dir, or undersrc/test/java/...)foo.rs↔tests/foo.rsand the convention of#[cfg(test)]blocks at the bottom of the file (we don't need to extract the test block; just include the file)Foo.cs↔FooTests.csAcceptance:
guessTestSiblings()node bin/prpack.js --include-testson a small fixture and checking the outputComment here before you start so we don't duplicate work.