Skip to content

Commit

Permalink
removeListener -> off
Browse files Browse the repository at this point in the history
  • Loading branch information
ob1 authored and zivl committed Mar 1, 2024
1 parent a158b1b commit db55906
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion browser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare function sentryTestkit<
declare namespace sentryTestkit {
interface Page {
on(event: string, handler: (...args: any[]) => any): void
removeListener(event: string, handler: (...args: any[]) => any): void
off(event: string, handler: (...args: any[]) => any): void
}

interface ReportError {
Expand Down
2 changes: 1 addition & 1 deletion src/testkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function createTestkit(): Testkit {
},

stopListening: (page: any) => {
page.removeListener('request', puppeteerHandler)
page.off('request', puppeteerHandler)
},
},

Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare function sentryTestkit<
declare namespace sentryTestkit {
interface Page {
on(event: string, handler: (...args: any[]) => any): void
removeListener(event: string, handler: (...args: any[]) => any): void
off(event: string, handler: (...args: any[]) => any): void
}

interface ReportError {
Expand Down

0 comments on commit db55906

Please sign in to comment.