varar 0.8.1, @varar/vitest.
Repro:
steps.ts file A is discovered by the project's configured step-file glob and uses {date} in one of its expressions.
- The
date parameter type is registered by a separate file, dateParam.ts, which is not named to match the glob — it's reached only via a plain import './dateParam.ts' from A.
dateParam.ts contains nothing but steps().param('date', /\d{4}-\d{2}-\d{2}/).
Result: the suite fails with
stale oath transform: expected example #0 of <doc>.md to be named "<sensor trigger sentence>", found "<stimulus sentence>". The step definitions changed after this oath was transformed — re-run the suite.
Re-running does not clear it, and neither does clearing node_modules/.vite or running with VARAR_UPDATE=1.
Fix found by trial: renaming dateParam.ts to dateParam.steps.ts — so it's independently matched and discovered by the same step-file glob, with no other change — makes the failure disappear immediately and permanently.
Possible fix:
- Treat a
steps() call reached via a plain import from a glob-discovered file the same as one found directly by the glob.
- Would let shared vocabulary (a parameter type several oaths need) live in an ordinary, explicitly-imported helper module instead of masquerading as its own step file.
varar 0.8.1,
@varar/vitest.Repro:
steps.tsfile A is discovered by the project's configured step-file glob and uses{date}in one of its expressions.dateparameter type is registered by a separate file,dateParam.ts, which is not named to match the glob — it's reached only via a plainimport './dateParam.ts'from A.dateParam.tscontains nothing butsteps().param('date', /\d{4}-\d{2}-\d{2}/).Result: the suite fails with
Re-running does not clear it, and neither does clearing node_modules/.vite or running with VARAR_UPDATE=1.
Fix found by trial: renaming
dateParam.tstodateParam.steps.ts— so it's independently matched and discovered by the same step-file glob, with no other change — makes the failure disappear immediately and permanently.Possible fix:
steps()call reached via a plainimportfrom a glob-discovered file the same as one found directly by the glob.