Comparing version 3.1.2 to 3.1.3
{ | ||
"name": "pactum", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "REST API Testing Tool for all levels in a Test Pyramid", | ||
@@ -70,3 +70,3 @@ "main": "./src/index.js", | ||
"openapi-fuzzer-core": "^1.0.6", | ||
"pactum-matchers": "^1.0.6", | ||
"pactum-matchers": "^1.1.0", | ||
"parse-graphql": "^1.0.0", | ||
@@ -73,0 +73,0 @@ "phin": "^3.6.0", |
@@ -345,3 +345,8 @@ const assert = require('assert'); | ||
if (data) { | ||
Object.assign(rules, jmv.getMatchingRules(data, '$.body')); | ||
const current_rules = jmv.getMatchingRules(data, '$.body'); | ||
const errors = jmv.validate(actual, jmv.getRawValue(data), current_rules, '$.body'); | ||
if (errors) { | ||
this.fail(errors.replace('$.body', '$')); | ||
} | ||
Object.assign(rules, current_rules); | ||
} | ||
@@ -348,0 +353,0 @@ } |
@@ -214,8 +214,17 @@ const fd = require('../plugins/form.data') | ||
} | ||
const cookieObject = utils.createCookieObject(key, value); | ||
let cookie; | ||
if (typeof key === 'object') { | ||
cookie = lc.serialize(key); | ||
} else { | ||
if (value) { | ||
cookie = `${key}=${value}`; | ||
} else { | ||
cookie = key; | ||
} | ||
} | ||
const headers = this._request.headers; | ||
if (headers['cookie'] !== undefined) { | ||
headers['cookie'] = headers['cookie'] + ';' + lc.serialize(cookieObject); | ||
headers['cookie'] = headers['cookie'] + ';' + cookie; | ||
} else { | ||
headers['cookie'] = lc.serialize(cookieObject); | ||
headers['cookie'] = cookie; | ||
} | ||
@@ -222,0 +231,0 @@ return this; |
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
157622
4725
Updatedpactum-matchers@^1.1.0