SmartTest

External repositories

These are the 0.6.0 results. The 1.0.0 benchmarks are in Benchmarks for 1.0.0: the same four repositories, LeadsIt and OpenPro's front end, re-measured with the 1.0.0 candidate, plus the 0.5.0 and 0.8.0 targets.

The 0.6.0 adoption check: take repositories SmartTest has never seen, run smarttest init --yes, change nothing in the generated configuration, and replay their recent history with smarttest benchmark --commits 12. A failure that the selection did not include counts as a miss unless it also fails on the parent commit.

The CLI was run from the packed build (packages/cli/.publish/dist/bin.js), since the package was not on npm at the time. Dependencies were installed with each project's own lockfile.

RepositoryRunnerTest filesCommitsFull runsSmartTestSavedTest files runFull-suite fallbacksMissedAlready failing
tj/commander.jsnode --test1101227.1 s18.1 s33%644 / 1,312506
pillarjs/path-to-regexpVitest31261.4 s47.3 s23%30 / 36400
unjs/ufoVitest13129.9 s10.9 s−11%99 / 156700
unjs/defuVitest2128.0 s8.5 s−6%14 / 24600
LeadsItJest, Vitest, node --test10040 of the last 200240.7 s88.3 s63%522 / 3,052200

All five were set up by init --yes without configuration edits, and none had a missed failure.

What the numbers say #

Problems found and fixed in SmartTest #

Found onProblemFix
ts-lib-vitest fixturenew Cache().set(…).size(): a method that returns this hid the members called on its result, so a change to size selected nothingA method that lets this escape makes its callers depend on the whole class
yarn-workspaces-node fixturenode --test packages/*/test/: a glob that matches directories found no test filesDirectory globs are searched like directories, as Node does
All fiveThe generated hook would block commits on machines where SmartTest is not installed yetThe hook runs SmartTest when node_modules/.bin/smarttest exists and prints a notice otherwise

Not covered yet #

Edit this page on GitHub