Skip to main content

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

PropertyTypeDescription
constraintBettererTestConstraint<DeserialisedType>The constraint function for the test.
deadline?BettererTestDeadline(Optional) The deadline for the test.
differBettererDiffer<DeserialisedType, DiffType>The function that compares two test results.
goalDeserialisedType | 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.
serialiserBettererSerialiser<DeserialisedType, SerialisedType>The functions that serialises and deserialises a test result between the DeserialisedType and SerialisedType.
testBettererTestFunction<DeserialisedType>The function that runs the actual test.