@rbxts/expect > Assertion > matches
Assertion.matches() method
Asserts that the actual value has the same properties and values as the expected
.
Signature:
matches<R extends object>(expected: R): Assertion<R & T>;
Parameters
Parameter | Type | Description |
---|---|---|
expected | R |
Returns:
Assertion<R & T>
Remarks
Type alias for match.
Example
expect({
name: "daymon",
age: 24
children: [{
name: "michael",
age: 4
}]
}).to.be.an.object().that.matches({ age: 24 });