Comparing version 3.6.1 to 3.6.2
{ | ||
"name": "pactum", | ||
"version": "3.6.1", | ||
"version": "3.6.2", | ||
"description": "REST API Testing Tool for all levels in a Test Pyramid", | ||
@@ -55,3 +55,3 @@ "main": "./src/index.js", | ||
"dependencies": { | ||
"@exodus/schemasafe": "^1.2.3", | ||
"@exodus/schemasafe": "^1.3.0", | ||
"deep-override": "^1.0.2", | ||
@@ -69,4 +69,4 @@ "form-data-lite": "^1.0.3", | ||
"devDependencies": { | ||
"chai": "^4.3.7", | ||
"mocha": "^10.2.0", | ||
"chai": "^4.4.1", | ||
"mocha": "^10.3.0", | ||
"nyc": "^15.1.0", | ||
@@ -73,0 +73,0 @@ "sinon": "^15.2.0" |
@@ -0,4 +1,4 @@ | ||
import * as E2E from './models/E2E'; | ||
import * as Fuzz from './models/Fuzz'; | ||
import * as Spec from './models/Spec'; | ||
import * as Fuzz from './models/Fuzz'; | ||
import * as E2E from './models/E2E'; | ||
@@ -8,2 +8,3 @@ import expect from './exports/expect'; | ||
export * as events from './exports/events'; | ||
export * as handler from './exports/handler'; | ||
@@ -10,0 +11,0 @@ export * as mock from './exports/mock'; |
@@ -24,2 +24,3 @@ require('./plugins/logger').setAdapter(require('./adapters/logger')); | ||
const reporter = require('./exports/reporter'); | ||
const events = require('./exports/events'); | ||
@@ -45,2 +46,3 @@ const processor = require('./helpers/dataProcessor'); | ||
reporter, | ||
events, | ||
@@ -47,0 +49,0 @@ spec(name, data) { |
@@ -13,2 +13,3 @@ const phin = require('phin'); | ||
const hr = require('../helpers/handler.runner'); | ||
const { events, EVENT_TYPES } = require('../exports/events'); | ||
@@ -257,2 +258,3 @@ class Tosser { | ||
try { | ||
events.emit(EVENT_TYPES.BEFORE_REQUEST, request); | ||
log.debug(`${request.method} ${request.url}`); | ||
@@ -272,4 +274,6 @@ res = await phin(request); | ||
res = error; | ||
} finally { | ||
res.responseTime = Date.now() - requestStartTime; | ||
events.emit(EVENT_TYPES.AFTER_RESPONSE, res); | ||
} | ||
res.responseTime = Date.now() - requestStartTime; | ||
return res; | ||
@@ -276,0 +280,0 @@ } |
170200
63
5086
Updated@exodus/schemasafe@^1.3.0