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): move OverriddenExpectProperties outside the namespace (#7319)

Max Schmitt9f3bccc20011
diff --git a/types/testExpect.d.ts b/types/testExpect.d.ts
index e386583919..59541a7068 100644
--- a/types/testExpect.d.ts
+++ b/types/testExpect.d.ts
@@ -29,17 +29,18 @@ export declare type Expect = {
stringMatching(expected: string | RegExp): AsymmetricMatcher;
};
+type OverriddenExpectProperties =
+'not' |
+'resolves' |
+'rejects' |
+'toMatchInlineSnapshot' |
+'toThrowErrorMatchingInlineSnapshot' |
+'toMatchSnapshot' |
+'toThrowErrorMatchingSnapshot';
+
declare global {
export namespace PlaywrightTest {
- type OverriddenProperties =
- 'not' |
- 'resolves' |
- 'rejects' |
- 'toMatchInlineSnapshot' |
- 'toThrowErrorMatchingInlineSnapshot' |
- 'toMatchSnapshot' |
- 'toThrowErrorMatchingSnapshot';
- export interface Matchers<R> extends Omit<expect.Matchers<R>, OverriddenProperties> {
+ export interface Matchers<R> extends Omit<expect.Matchers<R>, OverriddenExpectProperties> {
/**
* If you know how to test something, `.not` lets you test its opposite.
*/