fix(core): declare the dist-only test target in five package.json-configured packages - #11489
Conversation
|
Claude finished @igorlukanin's task in 3m 16s —— View job Review: approve in spirit — mechanically correct, no regressions found. 0 high, 0 medium, 3 low (1 inline, 2 informational).Full review
VerificationI could not run jest here (no No script loses suites. All 9 test sources across the five packages live directly under No Firebolt Adjacent inconsistency (out of scope, worth a follow-up). Low-severity notes
Other focus areasSecurity, performance, input sanitization, error handling: not applicable — the diff is test-harness configuration only, no runtime code paths, no published files ( Nice touch red-checking the defect by backing the change out and confirming the |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #11489 +/- ##
===========================================
- Coverage 79.46% 59.41% -20.06%
===========================================
Files 480 235 -245
Lines 98810 18384 -80426
Branches 3636 3714 +78
===========================================
- Hits 78515 10922 -67593
+ Misses 19774 6933 -12841
- Partials 521 529 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
jestkey inpackage.jsonrather than ajest.config.js, so the dist-only convention never reached them: each has TypeScript test sources, no transform that can compile them, and nothing confining collection todist/. A barejestcollected the sources and failed to parse them — thedist/testpath argument in each package's script was the only thing keeping the suite runnable.jest.base.config.jsand declares a dist-pointingtestMatch, matching the convention the other packages in this class already follow. The inlinetestEnvironment: 'node'is dropped because the base config already sets it.cubejs-firebolt-driveris the one non-mechanical case: its inline key also carriedsetupFiles: ['./test/test-env.js'], and the base config declares its ownsetupFiles, so the new config unions the two rather than letting the spread drop it. That file maps theDRIVERS_TESTS_FIREBOLT_*env vars onto theCUBEJS_DB_*names the driver reads, and it stays a source path —tschas noallowJs, so it is never emitted intodist/.Three of these five (
postgres,mongobi,firebolt) are exercised by theintegrationmatrix, which runslerna run integration:<db>. Since jest intersects a script's path argument withtestMatch, the risk here is a config narrower than the path argument silently shrinking what CI runs, so that is what the test plan proves rather than assumes.Test plan
jest --listTestscaptured before vs after for every jest-invoking script in all five packages: byte-identical on both sides (md5-matched per package) — no existing script collects fewer suites than it did before.jestin each package: 9 untransformabletest/*.tsentries no longer collected, 0 compiled suites lost.jestincubejs-postgres-driverfailstest/type-parsers.test.tswithSyntaxError: Cannot use import statement outside a module; with it, onlydist/test/type-parsers.test.jsis collected and passes (3 tests).cubejs-firebolt-driver's resolvedsetupFilesasserted to contain both the base setup file andtest/test-env.js, and a suite run through the new config to confirm both resolve at run time (3 passed).testMatch;eslintclean.