Files
docx-js/ts/tests/docx/run/strikeTests.ts

34 lines
875 B
TypeScript
Raw Normal View History

import { assert } from "chai";
import { DoubleStrike, Strike } from "../../../docx/run/formatting";
2017-03-09 22:56:08 +00:00
import { Utility } from "../../utility";
2016-07-18 19:17:19 +01:00
describe("Strike", () => {
let strike: Strike;
beforeEach(() => {
strike = new Strike();
});
describe("#constructor()", () => {
it("should create a Strike with correct root key", () => {
2017-03-09 22:56:08 +00:00
const newJson = Utility.jsonify(strike);
2016-07-18 19:17:19 +01:00
assert.equal(newJson.rootKey, "w:strike");
});
});
});
describe("DoubleStrike", () => {
let strike: DoubleStrike;
beforeEach(() => {
strike = new DoubleStrike();
});
describe("#constructor()", () => {
it("should create a Double Strike with correct root key", () => {
2017-03-09 22:56:08 +00:00
const newJson = Utility.jsonify(strike);
2016-07-18 19:17:19 +01:00
assert.equal(newJson.rootKey, "w:dstrike");
});
});
2017-03-09 22:56:08 +00:00
});