Comparing version 3.7.4 to 3.7.5
{ | ||
"name": "pactum", | ||
"version": "3.7.4", | ||
"version": "3.7.5", | ||
"description": "REST API Testing Tool for all levels in a Test Pyramid", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -25,4 +25,8 @@ export type RequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'TRACE'; | ||
export interface InteractionResponse { | ||
status: number; | ||
export type InteractionResponse = ( | ||
{ onCall: OnCall; status?: number } // If onCall is present, status is optional | ||
| (InteractionResponseBase & { status: number }) // If onCall is absent, status is required | ||
); | ||
export interface InteractionResponseBase { | ||
headers?: object; | ||
@@ -37,2 +41,6 @@ cookies?: object; | ||
export interface OnCall { | ||
[key: number]: Omit<InteractionResponseBase, 'onCall'> & { status: number }; | ||
} | ||
export interface RandomDelay { | ||
@@ -43,6 +51,2 @@ min: number; | ||
export interface OnCall { | ||
[key: number]: InteractionResponse | ||
} | ||
export interface InteractionExpectations { | ||
@@ -49,0 +53,0 @@ disable?: boolean; |
@@ -131,2 +131,5 @@ const assert = require('assert'); | ||
} | ||
if (Array.isArray(actualCookie) && actualCookie.length > 1) { | ||
actualCookie = actualCookie.join('; ') + ';'; | ||
} | ||
actualCookie = lc.parse(actualCookie); | ||
@@ -133,0 +136,0 @@ const msg = jlv.validate(actualCookie, expectedCookie, { target: 'Cookie' }); |
@@ -114,2 +114,4 @@ const phin = require('phin'); | ||
this.response = await getResponse(this); | ||
this.spec._response = this.response; | ||
await th.runResponseHandler(this.spec); | ||
} else { | ||
@@ -116,0 +118,0 @@ break; |
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
182928
5496