added basic test for drawing

This commit is contained in:
Dolan Miu
2017-03-12 23:32:02 +00:00
parent 8d72fa5542
commit 34ce662f70

View File

@ -0,0 +1,18 @@
import { assert, expect } from "chai";
import { Drawing } from "../../../../docx/run/run-components/drawing";
import { Utility } from "../../../utility";
describe.only("Drawing", () => {
let currentBreak: Drawing;
beforeEach(() => {
currentBreak = new Drawing("test.jpg");
});
describe("#constructor()", () => {
it("should create a Drawing with correct root key", () => {
const newJson = Utility.jsonify(currentBreak);
assert.equal(newJson.rootKey, "w:drawing");
});
});
});