toEqual

Bun

Symbol

Matchers.toEqual

toEqual(expected: T): void

Asserts that a value is deeply equal to what is expected.

@param expected

the expected value

expect(100 + 23).toBe(123);
expect("d" + "og").toBe("dog");
expect([456]).toEqual([456]);
expect({ value: 1 }).toEqual({ value: 1 });