BettererTestOptionsComplex
API > @betterer/betterer > BettererTestOptionsComplex
For a more complex version of a BettererTest
that operates on more complex objects, you need to define more complex behaviour.
Signature
export interface BettererTestOptionsComplex<DeserialisedType, SerialisedType, DiffType>
Properties
Property | Type | Description |
---|---|---|
constraint | BettererTestConstraint<DeserialisedType> | The constraint function for the test. |
deadline? | BettererTestDeadline | (Optional) The deadline for the test. |
differ | BettererDiffer<DeserialisedType, DiffType> | The function that compares two test results. |
goal | DeserialisedType | BettererTestGoal<DeserialisedType> | The goal function or goal value for the test. |
printer? | BettererPrinter<SerialisedType> | (Optional) The function that converts a serialised test result to the string that will be saved in the test results file |
progress? | BettererProgress<DeserialisedType> | (Optional) The function that converts a test result to a numeric value that represents the progress towards the goal. |
serialiser | BettererSerialiser<DeserialisedType, SerialisedType> | The functions that serialises and deserialises a test result between the DeserialisedType and SerialisedType . |
test | BettererTestFunction<DeserialisedType> | The function that runs the actual test. |