Files
docx-js/ts/docx/run/strike.spec.ts

35 lines
866 B
TypeScript
Raw Normal View History

import { assert } from "chai";
import { Utility } from "../../tests/utility";
import { DoubleStrike, Strike } from "./formatting";
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
});