@wpazderski/playwright-utils
    Preparing search index...
    • Compares contents of the value with contents of expected, performing "deep equality" check. Allows extra properties to be present in the value, unlike expect(value).toEqual(expected), so you can check just a subset of object properties.

      When comparing arrays, the number of items must match, and each item is checked recursively.

      Usage

      const value = {
      a: 1,
      b: 2,
      c: true,
      };
      expect(value).toMatchObject({ a: 1, c: true });
      expect(value).toMatchObject({ b: 2, c: true });

      expect([{ a: 1, b: 2 }]).toMatchObject([{ a: 1 }]);

      Parameters

      • internalOptions: MatcherInternalOptions

        Internal options that provide extra context for the matcher.

      • received: object

        Received value.

      • expected: object

        The expected object value to match against.

      Returns void