2017-03-07 22:15:53 +00:00
|
|
|
import { assert } from "chai";
|
2017-03-12 17:51:01 +01:00
|
|
|
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
|
|
|
});
|