echoapi-converter 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5120,13 +5120,10 @@ class ThunderToApipost {
|
|
|
5120
5120
|
str = `const data = response.headers['content-encoding']`;
|
|
5121
5121
|
}
|
|
5122
5122
|
else if (lodash.isEqual(test === null || test === void 0 ? void 0 : test.type, "custom-headers")) {
|
|
5123
|
-
str = `const data = response.headers['${
|
|
5123
|
+
str = `const data = response.headers['${lodash.toLower(test === null || test === void 0 ? void 0 : test.custom)}']`;
|
|
5124
5124
|
}
|
|
5125
5125
|
else if (lodash.isEqual(test === null || test === void 0 ? void 0 : test.type, "json-query")) {
|
|
5126
|
-
str = `const data = _.get(response.json,
|
|
5127
|
-
${test === null || test === void 0 ? void 0 : test.custom},
|
|
5128
|
-
"json."
|
|
5129
|
-
))`;
|
|
5126
|
+
str = `const data = _.get(response.json, ${lodash.toString(lodash.trimStart(test === null || test === void 0 ? void 0 : test.custom, "json."))})`;
|
|
5130
5127
|
}
|
|
5131
5128
|
if (action === "istype") {
|
|
5132
5129
|
return {
|
|
@@ -5173,7 +5170,7 @@ class ThunderToApipost {
|
|
|
5173
5170
|
|
|
5174
5171
|
pm.test("${test.action}", function () {
|
|
5175
5172
|
${str}
|
|
5176
|
-
pm.expect(isType(data
|
|
5173
|
+
pm.expect(isType(data,${lodash.toString(toUpper(test.value))})).to.true;
|
|
5177
5174
|
});`,
|
|
5178
5175
|
};
|
|
5179
5176
|
}
|