added different types of underline

This commit is contained in:
Dolan Miu
2016-07-13 00:59:53 +01:00
parent 54b2c16d7a
commit adb4e933ef
5 changed files with 172 additions and 13 deletions

View File

@ -10,7 +10,7 @@ function jsonify(obj: Object) {
return JSON.parse(stringifiedJson);
}
describe.only("Run", () => {
describe("Run", () => {
let run: Run;
beforeEach(() => {

View File

@ -0,0 +1,37 @@
import * as u from "../../../docx/run/underline";
import {TextRun} from "../../../docx/run/text-run";
import {assert} from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe.only("Underline", () => {
describe("#constructor()", () => {
it("should create a new Underline object", () => {
let underline = new u.Underline();
let newJson = jsonify(underline);
assert.equal(newJson.rootKey, "w:u");
});
});
});
describe.only("Underline", () => {
describe("#constructor()", () => {
it("should create a new Underline object", () => {
let underline = new u.DashDotDotHeavyUnderline();
let newJson = jsonify(underline);
assert.equal(newJson.rootKey, "w:u");
});
it("should put value in attribute", () => {
let underline = new u.DashDotDotHeavyUnderline();
let newJson = jsonify(underline);
assert.equal(newJson.rootKey, "w:u");
});
});
});