bigger()
API > @betterer/constraints > bigger
Betterer
constraint function for when a numeric result is expected to get bigger.
Signature
export declare function bigger(result: number, expected: number): BettererConstraintResult;
Parameters
Parameter | Type | Description |
---|---|---|
result | number | Result from the current test run. |
expected | number | Expected result from the results file. |
Returns
Example
import { bigger } from '@betterer/constraints';
bigger(1, 2); // worse
bigger(1, 1); // worse
bigger(2, 1); // better
bigger(2, 2); // same