Change docx folder to more appropriate "file" folder

This commit is contained in:
Dolan
2017-12-20 01:03:20 +00:00
parent 43ebfe7a2f
commit 2358139a6b
117 changed files with 22 additions and 23 deletions

View File

@ -0,0 +1,50 @@
import { assert } from "chai";
import { Utility } from "../../../tests/utility";
import { SubScript, SuperScript } from "./script";
describe("SubScript", () => {
let subScript: SubScript;
beforeEach(() => {
subScript = new SubScript();
});
describe("#constructor()", () => {
it("should create a Sub Script with correct attributes", () => {
const newJson = Utility.jsonify(subScript);
const attributes = {
val: "subscript",
};
assert.equal(JSON.stringify(newJson.root[0].root), JSON.stringify(attributes));
});
it("should create a Sub Script with correct root key", () => {
const newJson = Utility.jsonify(subScript);
assert.equal(newJson.rootKey, "w:vertAlign");
});
});
});
describe("SuperScript", () => {
let superScript: SuperScript;
beforeEach(() => {
superScript = new SuperScript();
});
describe("#constructor()", () => {
it("should create a Super Script with correct attributes", () => {
const newJson = Utility.jsonify(superScript);
const attributes = {
val: "superscript",
};
assert.equal(JSON.stringify(newJson.root[0].root), JSON.stringify(attributes));
});
it("should create a Super Script with correct root key", () => {
const newJson = Utility.jsonify(superScript);
assert.equal(newJson.rootKey, "w:vertAlign");
});
});
});