Skip to main content

@rbxts/expect > Assertion > falsy

Assertion.falsy() method

Asserts that the value is a "falsy" value, according to luau.

Signature:

falsy(): this;

Returns:

this

Remarks

A falsy value is a value of false or nil.

You can read more about it on the luau docs.

Example

expect(false).to.be.falsy();
expect(undefined).to.be.falsy();

expect(0).to.not.be.falsy();
expect("").to.not.be.falsy();