🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

apiunit

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apiunit - npm Package Compare versions

Comparing version

to
2.2.0

6

dist/entities/actualResponse.js

@@ -5,2 +5,3 @@ "use strict";

var diff_1 = require("./diff");
var fast_xml_parser_1 = require("fast-xml-parser");
var deepDiff = require('deep-diff').diff;

@@ -52,2 +53,7 @@ var ActualResponse = (function () {

}
else if ('content-type' in this.headers && this.headers['content-type'].startsWith('text/xml')) {
var jsonDiff = this.diffJson(fast_xml_parser_1.parse(this.body), fast_xml_parser_1.parse(expectedResponse.body));
if (jsonDiff)
diff = diff.concat(jsonDiff);
}
else if (expectedResponse.body !== this.body) {

@@ -54,0 +60,0 @@ diff.push(new diff_1.Diff("Body assertion failed. Expected '" + this.getStringValue(expectedResponse.body) + "' to equal to '" + this.getStringValue(this.body) + "'"));

3

package.json
{
"name": "apiunit",
"version": "2.1.16",
"version": "2.2.0",
"description": "Unit testing framework for API",

@@ -33,2 +33,3 @@ "main": "dist/index.js",

"deep-diff": "^1.0.0",
"fast-xml-parser": "^3.19.0",
"http-file": "^1.0.3",

@@ -35,0 +36,0 @@ "json-path": "^0.1.3",