@rbxts/expect > Assertion > finite
Assertion.finite() method
Asserts that the actual value is a number within +-math.huge
.
Signature:
finite(): Assertion<number>;
Returns:
Assertion<number>
Remarks
This comparison is exclusive, meaning a number that is math.huge
or -math.huge
is considered a fail.
Example
expect(5).to.be.finite();
expect(-5).to.be.finite();
expect("5").to.not.be.finite();
expect(math.huge).to.not.be.finite();