desloppify icon indicating copy to clipboard operation
desloppify copied to clipboard

TypeScript coverage discovery misses JavaScript tests under tests/ when scanning project root

Open sneakyfella69 opened this issue 3 weeks ago • 0 comments

With desloppify 1.0, a TypeScript project using Node ESM tests in tests/*.mjs can report “no test files found” under desloppify scan --path ., even when its test suite runs successfully.

A minimal synthetic layout is:

package.json
src/example.ts
tests/example.test.mjs

The test can import or otherwise load src/example.ts and assert its behavior. Expected: discover the ESM test file, then apply the normal mapping and quality analysis. Actual: the TypeScript language configuration has test_file_extensions=[".ts", ".tsx"], and _find_external_test_files also skips test directories inside the scan root. As a result, JavaScript test files excluded from the TypeScript source inventory are not added as supplemental tests during a root scan.

Likely areas to check: languages/typescript/__init__.py and languages/_framework/base/shared_phases_helpers.py. A regression test should cover root and src-only scans with .mjs/.cjs tests, without duplicating tests already in the source inventory.

This report uses a synthetic example and contains no private project source.

sneakyfella69 avatar Nov 10 '26 10:11 sneakyfella69