UNPKG

@unibeautify/beautifier-js-beautify

Version:
25 lines 855 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const unibeautify_1 = require("unibeautify"); const src_1 = require("../../src"); test(`should successfully beautify CSS text`, () => { const unibeautify = unibeautify_1.newUnibeautify(); unibeautify.loadBeautifier(src_1.default); const text = `.className1{font-size:12pt;}.className2{font-weight:bold;}`; const beautifierResult = `.className1 {\n\tfont-size: 12pt;\n}\n\n.className2 {\n\tfont-weight: bold;\n}`; return unibeautify .beautify({ languageName: "CSS", options: { CSS: { indent_style: "tab", indent_size: 1, }, }, text, }) .then(results => { expect(results).toBe(beautifierResult); }); }); //# sourceMappingURL=CSS.spec.js.map