@wpazderski/playwright-utils
    Preparing search index...

    Assymmetric matcher that matches an object that contains and matches all of the properties in the expected object. Note that received object may be a superset of the expected object and contain some extra properties.

    Use this method inside expect(value).toEqual(expected) to perform pattern matching. Object properties can be matchers to further relax the expectation. See examples.

    Usage

    // Assert some of the properties.
    expect({ foo: 1, bar: 2 }).toEqual(expect.objectContaining({ foo: 1 }));

    // Matchers can be used on the properties as well.
    expect({ foo: 1, bar: 2 }).toEqual(expect.objectContaining({ bar: expect.any(Number) }));

    // Complex matching of sub-properties.
    expect({
    list: [1, 2, 3],
    obj: { prop: 'Hello world!', another: 'some other value' },
    extra: 'extra',
    }).toEqual(expect.objectContaining({
    list: expect.arrayContaining([2, 3]),
    obj: expect.objectContaining({ prop: expect.stringContaining('Hello') }),
    }));

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    $$typeof: symbol = ...

    Symbol to identify asymmetric matcher.

    inverse: boolean

    If true, the matcher will check for non-matching values.

    sample: T

    The sample value to match against.

    Methods