@rbxts/expect > Assertion > truthy
Assertion.truthy() method
Asserts that the value is a "truthy" value, according to luau.
Signature:
truthy(): this;
Returns:
this
Remarks
A truthy value is any value that isn't false
or nil
.
You can read more about it on the luau docs.
Example
expect(1).to.be.truthy();
expect(0).to.be.truthy();
expect("day").to.be.truthy();
expect("").to.be.truthy();