@mablhq/mabl-cli 2.72.4 → 2.72.5
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.
|
@@ -90,6 +90,7 @@ const encodingUtil_1 = require("../../util/encodingUtil");
|
|
|
90
90
|
const stepValidation_1 = require("../entityValidation/stepValidation");
|
|
91
91
|
const lodash_get_1 = __importDefault(require("lodash.get"));
|
|
92
92
|
const object_hash_1 = __importDefault(require("object-hash"));
|
|
93
|
+
const domUtil_1 = require("../../domUtil");
|
|
93
94
|
exports.TEST_LISTEN = 'test';
|
|
94
95
|
exports.MABL_GENERATED_ASSERTION_TOKEN = '__MABL_GENERATED__';
|
|
95
96
|
exports.MABL_GENERATED_COMMENT = `// ${exports.MABL_GENERATED_ASSERTION_TOKEN} Do not edit below this line`;
|
|
@@ -1133,12 +1134,13 @@ function insertMablScriptsIntoEvent(event, getSnippet) {
|
|
|
1133
1134
|
delete event.mablVariables;
|
|
1134
1135
|
}
|
|
1135
1136
|
function wrapScriptInTryCatch(scriptLines, snippetName) {
|
|
1137
|
+
const escapedSnippetName = (0, domUtil_1.escapeMablscriptString)(snippetName);
|
|
1136
1138
|
return [
|
|
1137
1139
|
`try {`,
|
|
1138
1140
|
...scriptLines,
|
|
1139
1141
|
`} catch (mablSnippetError) {`,
|
|
1140
1142
|
` console.error("Error executing snippet:", mablSnippetError);`,
|
|
1141
|
-
` pm.expect.fail("Snippet '${
|
|
1143
|
+
` pm.expect.fail("Snippet '${escapedSnippetName}' execution failed");`,
|
|
1142
1144
|
`}`,
|
|
1143
1145
|
];
|
|
1144
1146
|
}
|