@contract-case/case-plugin-base
Version:
Plugin framework for writing plugins for the ContractCase test framework
28 lines • 1.07 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.matcherToString = exports.actualToString = void 0;
const pretty_format_1 = require("pretty-format");
/**
* Converts actual data into a string, for printing
* @public
* @param actual - the actual data that ContractCase encountered
* @param indent - how many spaces to indent this string
* @returns a printable string
*/
const actualToString = (actual, indent = 0) => (0, pretty_format_1.format)(actual, { indent });
exports.actualToString = actualToString;
/**
* Converts a matcher or data into a human friendly string for printing
* @public
* @remarks
* This is currently the same implementation as {@link actualToString}
*
* TODO: Add a better implementation that walks the tree and prints something
* like the DSL does for easy readability
*
* @param actual - the matcher descriptor
* @param indent - how many spaces to indent this string
* @returns a printable string
*/
exports.matcherToString = exports.actualToString;
//# sourceMappingURL=renderActual.js.map