Skip to content

Commit

Permalink
Make session request events asynchronous (#2795)
Browse files Browse the repository at this point in the history
  • Loading branch information
miherlosev authored Sep 29, 2022
1 parent 0aa7cdb commit 2d339a8
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 142 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "testcafe-hammerhead",
"description": "A powerful web-proxy used as a core for the TestCafe testing framework (https://github.com/DevExpress/testcafe).",
"version": "24.7.4",
"version": "25.0.0",
"homepage": "https://github.com/DevExpress/testcafe-hammerhead",
"bugs": {
"url": "https://github.com/DevExpress/testcafe-hammerhead/issues"
Expand Down
4 changes: 2 additions & 2 deletions src/session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export default abstract class Session extends EventEmitter {
return !!this.requestEventListeners.size;
}

addRequestEventListeners (rule: RequestFilterRule, listeners: RequestEventListeners, errorHandler: (event: RequestEventListenerError) => void): void {
async addRequestEventListeners (rule: RequestFilterRule, listeners: RequestEventListeners, errorHandler: (event: RequestEventListenerError) => void): Promise<void> {
const listenersData = {
listeners,
errorHandler,
Expand All @@ -307,7 +307,7 @@ export default abstract class Session extends EventEmitter {
this.requestEventListeners.set(rule.id, listenersData);
}

removeRequestEventListeners (rule: RequestFilterRule): void {
async removeRequestEventListeners (rule: RequestFilterRule): Promise<void> {
this.requestEventListeners.delete(rule.id);
}

Expand Down
Loading

0 comments on commit 2d339a8

Please sign in to comment.