Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(test-runner): remove unimplemented jest expect types (#7292)

Joel Einbinderba3f0ff6f54f
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<R> extends expect.Matchers<R> {
+ type OverriddenProperties =
+ 'not' |
+ 'resolves' |
+ 'rejects' |
+ 'toMatchInlineSnapshot' |
+ 'toThrowErrorMatchingInlineSnapshot' |
+ 'toMatchSnapshot' |
+ 'toThrowErrorMatchingSnapshot';
+ export interface Matchers<R> extends Omit<expect.Matchers<R>, 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;
/**