Skip to content

Commit c6bd82d

Browse files
committed
fix(testing): ev is not defined
1 parent b15c6a5 commit c6bd82d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/testing/puppeteer/puppeteer-declarations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export interface E2EPage extends PuppeteerPage {
117117
* Waits for the event to be received on `window`. The optional second argument
118118
* allows the listener to be set to `document` if needed.
119119
*/
120-
waitForEvent(eventName: string): Promise<Event>;
120+
waitForEvent(eventName: string): Promise<any>;
121121
}
122122

123123

src/testing/puppeteer/puppeteer-events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export async function waitForEvent(page: pd.E2EPageInternal, eventName: string,
4141
reject(`waitForEvent() timeout, eventName: ${eventName}`);
4242
}, 10000);
4343

44-
element.addEventListener(eventName, () => {
44+
element.addEventListener(eventName, ev => {
4545
clearTimeout(tmr);
4646
resolve((window as pd.BrowserWindow).stencilSerializeEvent(ev as any));
4747
}, {once: true});

0 commit comments

Comments
 (0)