From 8c77b7579d61166d2170080e33087f2cbd4ce8ad Mon Sep 17 00:00:00 2001 From: Mathias Leppich Date: Thu, 26 Sep 2024 22:36:54 +0200 Subject: [PATCH] undo fixes which are no longer necessary --- packages/playwright/src/matchers/expect.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/packages/playwright/src/matchers/expect.ts b/packages/playwright/src/matchers/expect.ts index b391b53295..16300607d9 100644 --- a/packages/playwright/src/matchers/expect.ts +++ b/packages/playwright/src/matchers/expect.ts @@ -154,7 +154,6 @@ function createExpect(info: ExpectMetaInfo, prefix: string[], customMatchers: Re const key = qualifiedMatcherName(qualifier, name); wrappedMatchers[key] = wrappedMatchers[name]; Object.defineProperty(wrappedMatchers[key], 'name', { value: name }); - Object.defineProperty(wrappedMatchers[key], 'qualifiedName', { value: key }); extendedMatchers[name] = wrappedMatchers[key]; } expectLibrary.extend(wrappedMatchers); @@ -178,24 +177,6 @@ function createExpect(info: ExpectMetaInfo, prefix: string[], customMatchers: Re return configure({ _poll: poll })(actual, messageOrOptions) as any; }; } - - if (typeof property === 'string' && typeof customMatchers[property] === 'function' && typeof (customMatchers[property] as any).qualifiedName === 'string') { - const qualifiedName = (customMatchers[property] as any).qualifiedName as string; - return (expectLibrary as any)[qualifiedName]; - } - - if (property === 'not') { - return new Proxy(expectLibrary.not, { - get: function(target: any, property: string) { - if (typeof property === 'string' && typeof customMatchers[property] === 'function' && typeof (customMatchers[property] as any).qualifiedName === 'string') { - const qualifiedName = (customMatchers[property] as any).qualifiedName as string; - return target[qualifiedName]; - } - return target[property]; - }, - }); - } - return (expectLibrary as any)[property]; }, });