UNPKG

@unibeautify/beautifier-prettydiff

Version:
25 lines 823 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const unibeautify_1 = require("unibeautify"); const src_1 = require("../../src"); test(`should successfully beautify EJS text`, () => { const unibeautify = unibeautify_1.newUnibeautify(); unibeautify.loadBeautifier(src_1.default); const text = `<% if (user) { %><h2><%= user.name %></h2><% } %>`; const beautifierResult = `<% if (user) { %>\n\t<h2><%= user.name %></h2>\n<% } %>`; return unibeautify .beautify({ languageName: "EJS", options: { EJS: { indent_style: "tab", indent_size: 1, }, }, text, }) .then(results => { expect(results).toBe(beautifierResult); }); }); //# sourceMappingURL=ejs.spec.js.map