Skip to content

Commit

Permalink
fix(testing): ev is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jun 25, 2019
1 parent b15c6a5 commit c6bd82d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/testing/puppeteer/puppeteer-declarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export interface E2EPage extends PuppeteerPage {
* Waits for the event to be received on `window`. The optional second argument
* allows the listener to be set to `document` if needed.
*/
waitForEvent(eventName: string): Promise<Event>;
waitForEvent(eventName: string): Promise<any>;
}


Expand Down
2 changes: 1 addition & 1 deletion src/testing/puppeteer/puppeteer-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function waitForEvent(page: pd.E2EPageInternal, eventName: string,
reject(`waitForEvent() timeout, eventName: ${eventName}`);
}, 10000);

element.addEventListener(eventName, () => {
element.addEventListener(eventName, ev => {
clearTimeout(tmr);
resolve((window as pd.BrowserWindow).stencilSerializeEvent(ev as any));
}, {once: true});
Expand Down

0 comments on commit c6bd82d

Please sign in to comment.