@wpazderski/playwright-utils
    Preparing search index...
    any: typeof any

    expect.any() matches any object instance created from the constructor or a corresponding primitive type. Use it inside expect(value).toEqual(expected) to perform pattern matching.

    Usage

    // Match instance of a class.
    class Example {}
    expect(new Example()).toEqual(expect.any(Example));

    // Match any number.
    expect({ prop: 1 }).toEqual({ prop: expect.any(Number) });

    // Match any string.
    expect('abc').toEqual(expect.any(String));

    Constructor of the expected object like ExampleClass, or a primitive boxed type like Number.