2019-03-05 17:17:06 +01:00
|
|
|
import { expect } from "chai";
|
|
|
|
import { Formatter } from "export/formatter";
|
|
|
|
import { Compatibility } from "file/settings/compatibility";
|
|
|
|
|
|
|
|
describe("Compatibility", () => {
|
|
|
|
describe("#constructor", () => {
|
|
|
|
it("creates an initially empty property object", () => {
|
|
|
|
const compatibility = new Compatibility();
|
|
|
|
|
|
|
|
const tree = new Formatter().format(compatibility);
|
2019-04-10 01:28:37 -04:00
|
|
|
expect(tree).to.deep.equal({ "w:compat": {} });
|
2019-03-05 17:17:06 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("#doNotExpandShiftReturn", () => {
|
|
|
|
it("should create a setting for not justifying lines ending in soft line break", () => {
|
|
|
|
const compatibility = new Compatibility();
|
|
|
|
compatibility.doNotExpandShiftReturn();
|
|
|
|
|
|
|
|
const tree = new Formatter().format(compatibility);
|
2019-04-10 01:28:37 -04:00
|
|
|
expect(tree).to.deep.equal({ "w:compat": [{ "w:doNotExpandShiftReturn": {} }] });
|
2019-03-05 17:17:06 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|