From 5e6b1f168b0f69fe2874e74c5a6965c417aca598 Mon Sep 17 00:00:00 2001 From: Anudeep Date: Thu, 12 Dec 2024 21:30:35 +0530 Subject: [PATCH] fix: response handler in retry --- package-lock.json | 4 ++-- package.json | 2 +- src/models/Tosser.js | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6631030..ef62b1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pactum", - "version": "3.7.4", + "version": "3.7.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "pactum", - "version": "3.7.4", + "version": "3.7.5", "license": "MIT", "dependencies": { "@exodus/schemasafe": "^1.3.0", diff --git a/package.json b/package.json index 99580e9..5b556eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pactum", - "version": "3.7.4", + "version": "3.7.5", "description": "REST API Testing Tool for all levels in a Test Pyramid", "main": "./src/index.js", "types": "./src/index.d.ts", diff --git a/src/models/Tosser.js b/src/models/Tosser.js index f22617b..01a265b 100644 --- a/src/models/Tosser.js +++ b/src/models/Tosser.js @@ -111,6 +111,8 @@ class Tosser { log.info(`Request retry initiated, waiting ${delay / 1000} ${scale} for attempt ${i + 1} of ${count}`); await helper.sleep(delay); this.response = await getResponse(this); + this.spec._response = this.response; + await th.runResponseHandler(this.spec); } else { break; }