@mojotech/prismatest
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -116,4 +116,9 @@ "use strict"; | ||
} | ||
return ["["].concat(elements.map(function (e) { return "\t\"" + printer(e) + "\","; }), ["]"]).join("\n\t"); | ||
return ["["].concat(elements.map(function (e) { return "\t\"" + printer(e) + "\","; }), ["]"]).join("\n"); | ||
}; | ||
var indent = function (toIndent, length) { | ||
var lines = toIndent.split("\n"); | ||
var indented = lines.map(function (line) { return "\t".repeat(length) + line; }); | ||
return indented.join("\n"); | ||
}; | ||
var MultipleSelectedElementsError = /** @class */ (function (_super) { | ||
@@ -135,5 +140,5 @@ __extends(MultipleSelectedElementsError, _super); | ||
"Multiple elements returned by selector:\n" + | ||
("\tSelector: \"" + printSelector(selector) + "\"\n") + | ||
("\tRoot: \"" + printElement(root) + "\"\n") + | ||
("\tSelected: " + printElements(elements, printElement)); | ||
("\tSelector:\n" + indent(printSelector(selector), 2) + "\n") + | ||
("\tRoot:\n" + indent(printElement(root), 2) + "\n") + | ||
("\tSelected:\n" + indent(printElements(elements, printElement), 2) + "\n"); | ||
return _this; | ||
@@ -160,5 +165,5 @@ } | ||
"Zero elements returned by selector\n" + | ||
("\tSelector: \"" + printSelector(selector) + "\"\n") + | ||
("\tRoot: \"" + printElement(root) + "\"\n") + | ||
("\tSelected: " + printElements(elements, printElement)); | ||
("\tSelector:\n" + indent(printSelector(selector), 2) + "\n") + | ||
("\tRoot:\n" + indent(printElement(root), 2) + "\n") + | ||
("\tSelected:\n" + indent(printElements(elements, printElement), 2) + "\n"); | ||
return _this; | ||
@@ -187,5 +192,5 @@ } | ||
("\tIndex: " + index + "\n") + | ||
("\tSelector: \"" + printSelector(selector) + "\"\n") + | ||
("\tRoot: \"" + printElement(root) + "\"\n") + | ||
("\tSelected: " + printElements(elements, printElement)); | ||
("\tSelector:\n" + indent(printSelector(selector), 2) + "\n") + | ||
("\tRoot:\n" + indent(printElement(root), 2) + "\n") + | ||
("\tSelected:\n" + indent(printElements(elements, printElement), 2) + "\n"); | ||
return _this; | ||
@@ -192,0 +197,0 @@ } |
{ | ||
"name": "@mojotech/prismatest", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Use test views to decouple tests from implementation details", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
22071
365