Conformance suite
Every quillflow runtime (TypeScript today, .NET next) must pass these files. The browser and the server re-validate the same form, so they must agree exactly.
| File | What it pins |
|---|---|
formulas.json |
Formula evaluation: { formula, ast, expect } with shared vars and today. Evaluate ast only; formula is for humans. expect: null means blank (also the result of an error). |
forms/*.json |
Whole-form behaviour: a canonical definition, mocked dataSources responses, and cases. |
Running a form case
- Load
definition. Ifexpect.definitionErroris set (e.g."cycle"), loading must fail with that error. - Use
today(default2026-03-15) andlanguage(default: the form's default language). - Answer data-source requests from
dataSources: the entry whoseidmatches and whoseparamsare deep-equal. No match means the request fails. - Apply
values(flat paths → values, all at once) ordata(a nested submission; unknown keys ignored). - Wait until no data-source requests are pending, then compare:
valid: the form has no errors;pages: page name → visible;dataSources: id →idle | loading | ready | error;fields: path → a subset ofvisible, required, readonly, value, label, hint, choices, pluserrors(list of codes) andmessages(list of rendered messages).noteis a comment;submission: deep-equal to the submitted data.
Editing
The JSON is generated. Edit the YAML under src/ and run npm run conformance:build.
forms/cycle.json is written by hand, because the compiler refuses to produce a cyclic form.
CI runs npm run conformance:check to catch stale JSON.