expect.objectContaining() matches an object containing specific properties and values.

test('object contains specific properties', () => {
  const obj = { a: 1, b: 2, c: 3 };

  expect(obj).toEqual(expect.objectContaining({
    a: 1,
    c: 3
  }));
});