Skip to main content

@rbxts/expect > Assertion > shallowEqual

Assertion.shallowEqual() method

Asserts that the value is shallow equal to the expectedValue.

Signature:

shallowEqual<R = T>(expectedValue: R): Assertion<R>;

Parameters

Parameter

Type

Description

expectedValue

R

Returns:

Assertion<R>

Remarks

A value is shallow equal if they pass according to ===.

If you need to deeply check if values are equal, use deepEqual.

Example

expect(5).to.shallowEqual(5);
expect("daymon").to.not.shallowEqual("bryan");