@rbxts/expect > Assertion > empty
Assertion.empty() method
Asserts that the value is empty.
Signature:
empty(): Assertion<T>;
Returns:
Assertion<T>
Remarks
Works with strings or iterable types.
An object is empty when it has no keys.
A string is empty when it has no characters.
An iterable is empty when it has no elements.
Example
expect([]).to.be.empty();
expect({}).to.be.empty();
expect("").to.be.empty();