From 770fce53e76bb4bdb96b06bbb80453c5f10022ff Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 24 Jun 2021 18:19:07 -0700 Subject: [PATCH] cherry-pick(release-1.12): remove unimplemented jest expect types (#7311) PR #7292 SHA ba3f0ff Co-authored-by: Joel Einbinder --- types/testExpect.d.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/types/testExpect.d.ts b/types/testExpect.d.ts index 1dd6afe7d1..e386583919 100644 --- a/types/testExpect.d.ts +++ b/types/testExpect.d.ts @@ -31,7 +31,15 @@ export declare type Expect = { declare global { export namespace PlaywrightTest { - export interface Matchers extends expect.Matchers { + type OverriddenProperties = + 'not' | + 'resolves' | + 'rejects' | + 'toMatchInlineSnapshot' | + 'toThrowErrorMatchingInlineSnapshot' | + 'toMatchSnapshot' | + 'toThrowErrorMatchingSnapshot'; + export interface Matchers extends Omit, OverriddenProperties> { /** * If you know how to test something, `.not` lets you test its opposite. */ @@ -49,8 +57,8 @@ declare global { /** * Match snapshot */ - toMatchSnapshot(options?: { - name?: string, + toMatchSnapshot(options: { + name: string, threshold?: number }): R; /**