Variable: fixtures
const fixtures: object;
Defined in: packages/testing/src/fixtures.ts:84
Type Declaration
calculated()
calculated(opts?): FormDefinition;
A calculate field, which must reject user writes (docs/04, ODK parity).
Parameters
| Parameter | Type |
|---|---|
opts | BaseOptions |
Returns
consentGated()
consentGated(opts?): FormDefinition;
Consent gating: everything after the consent question is irrelevant until
it is answered yes. This is the shape almost every humanitarian form
opens with, and the one where ODK's "relevance clears on finalize" rule
actually bites (docs/04).
Parameters
| Parameter | Type |
|---|---|
opts | BaseOptions |
Returns
fromJson()
fromJson(json, opts?): FormDefinition;
Load a definition a host already has — the two agency examples in
docs/examples/, or its own form.
Validates by default, because a fixture that is silently invalid turns
every test written against it into a test of the wrong thing. Pass
{ validate: false } when the invalid document IS the fixture.
Parameters
| Parameter | Type |
|---|---|
json | unknown |
opts | { validate?: boolean; } |
opts.validate? | boolean |
Returns
large()
large(opts?): FormDefinition;
A form sized for the performance budgets in docs/05 §perf (300 questions, full recompute < 16 ms on the reference device).
Parameters
| Parameter | Type |
|---|---|
opts | LargeFormOptions |
Returns
minimal()
minimal(opts?): FormDefinition;
One page, one required text field. The smallest thing that can fail.
Parameters
| Parameter | Type |
|---|---|
opts | BaseOptions |
Returns
multiPage()
multiPage(opts?): FormDefinition;
Three pages, the middle one gated — for paging and skip-logic tests.
Parameters
| Parameter | Type |
|---|---|
opts | BaseOptions |
Returns
repeats()
repeats(opts?): FormDefinition;
A count-driven repeat next to a manual one. The count-driven repeat must refuse a manual add — an ODK semantic the engine enforces and hosts routinely get wrong when they build their own repeat UI.
Parameters
| Parameter | Type |
|---|---|
opts | BaseOptions |
Returns
validation()
validation(opts?): FormDefinition;
Required, constraint, and a warning-severity validator on one page.
Parameters
| Parameter | Type |
|---|---|
opts | BaseOptions |