Comparing version 3.1.13 to 3.1.14
{ | ||
"name": "pactum", | ||
"version": "3.1.13", | ||
"version": "3.1.14", | ||
"description": "REST API Testing Tool for all levels in a Test Pyramid", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -5,2 +5,3 @@ import { InteractionRequest, Interaction } from './mock'; | ||
method: string; | ||
url: string; | ||
path: string; | ||
@@ -60,2 +61,2 @@ headers?: object; | ||
*/ | ||
export function end(): Promise<void>; | ||
export function end(): Promise<void>; |
@@ -119,3 +119,4 @@ const jqy = require('json-query'); | ||
getOutput, | ||
storeInteractionData | ||
storeInteractionData, | ||
getPathValueFromRequestResponse | ||
}; |
@@ -387,2 +387,3 @@ import { RequestOptions, IncomingMessage } from 'http'; | ||
inspect(): Spec; | ||
inspect(path: string): Spec; | ||
@@ -389,0 +390,0 @@ /** |
@@ -471,4 +471,15 @@ const fd = require('../plugins/form.data') | ||
inspect() { | ||
this._inspect = true; | ||
inspect(inspect_path) { | ||
if (this._inspect) { | ||
if (typeof this._inspect === 'boolean') { | ||
this._inspect = []; | ||
} | ||
this._inspect.push(inspect_path); | ||
} else { | ||
if (inspect_path) { | ||
this._inspect = [inspect_path]; | ||
} else { | ||
this._inspect = true; | ||
} | ||
} | ||
return this; | ||
@@ -475,0 +486,0 @@ } |
@@ -121,3 +121,10 @@ const phin = require('phin'); | ||
log.warn('Inspecting Request & Response'); | ||
utils.printReqAndRes(this.request, this.response); | ||
if (typeof this.spec._inspect === 'boolean') { | ||
utils.printReqAndRes(this.request, this.response); | ||
} else { | ||
for (let i = 0; i < this.spec._inspect.length; i++) { | ||
const inspect_path = this.spec._inspect[i]; | ||
log.warn(inspect_path, th.getPathValueFromRequestResponse(inspect_path, this.spec._request, this.spec._response)); | ||
} | ||
} | ||
} | ||
@@ -124,0 +131,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
161812
4851