Expand description
record --from-tests -- <test command>: runs the original’s own test suite and keeps every
call it makes to the unit’s exported functions as recorded inputs, so the cases cover what
the project’s authors thought worth testing, not only generated values.
TS/JS: test runners (Jest, Vitest, ts-jest) load sources through their own module systems, so
no Node hook sees the calls. The unit’s files get a few lines appended for the run instead,
wrapping each exported function declaration, and are restored from a backup afterwards (also
at the start of the next run, if a run was killed). Python: an import hook on PYTHONPATH
wraps the functions when their module loads; no file changes.
Structs§
Constants§
Functions§
- capture
- with_
own_ inputs - The inputs file
recordtakes: the captured calls, afterowninputs when there are some.