/// /** * Augment the Jest namespace to include the WebDriverIO custom matchers only. * When Jest Library is used, specify `expect-webdriverio/jest` for this file in the tsconfig.json's types. */ declare namespace jest { interface Matchers, T> extends ExpectWebdriverIO.Matchers { /** * Below are overloaded Jest's matchers not part of `expect` but of `jest-snapshot`. * @see https://github.com/jestjs/jest/blob/73dbef5d2d3195a1e55fb254c54cce70d3036252/packages/jest-snapshot/src/types.ts#L37 * * Note: We need to define them below so that they are correctly overloaded. * Else even when extending `WdioJestOverloadedMatchers` we have typing errors. */ /** * snapshot matcher * A plain `Element[]` or `MultiRemoteElement[]` is only recognized from its elements, so an empty one is snapshotted synchronously * @param label optional snapshot label */ toMatchSnapshot(label?: string): T extends PromiseLike | ChainablePromiseElement | ChainablePromiseArray | WebdriverIO.Element | WebdriverIO.MultiRemoteElement | WebdriverIO.ElementArray | WebdriverIO.MultiRemoteElementArray ? Promise : T extends WebdriverIO.Element[] | WebdriverIO.MultiRemoteElement[] ? Promise | R : R; /** * inline snapshot matcher * A plain `Element[]` or `MultiRemoteElement[]` is only recognized from its elements, so an empty one is snapshotted synchronously * @param snapshot snapshot string (autogenerated if not specified) * @param label optional snapshot label */ toMatchInlineSnapshot(snapshot?: string, label?: string): T extends PromiseLike | ChainablePromiseElement | ChainablePromiseArray | WebdriverIO.Element | WebdriverIO.MultiRemoteElement | WebdriverIO.ElementArray | WebdriverIO.MultiRemoteElementArray ? Promise : T extends WebdriverIO.Element[] | WebdriverIO.MultiRemoteElement[] ? Promise | R : R; } interface Expect extends ExpectWebdriverIO.Expect {} interface InverseAsymmetricMatchers extends ExpectWebdriverIO.AsymmetricMatchers {} }