cherry-pick(release-1.12): move OverriddenExpectProperties outside the namespace (#7322)

PR #7319 SHA 9f3bccc200

Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
Andrey Lushnikov 2021-06-25 11:27:17 -07:00 committed by GitHub
parent 96fc610408
commit 2de5deb926
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

19
types/testExpect.d.ts vendored
View file

@ -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.
*/