made all tests passing

This commit is contained in:
Dolan Miu
2016-04-09 04:53:42 +01:00
parent aed59754cc
commit 84610bd72f
9 changed files with 81 additions and 20 deletions

View File

@ -2,6 +2,11 @@
/// <reference path="../typings/chai/chai.d.ts" />
import {Body} from "../docx/document/body";
import {assert} from "chai";
import {SectionProperties} from "../docx/document/body/section-properties";
import {PageSize} from "../docx/document/body/page-size";
import {PageMargin} from "../docx/document/body/page-margin";
import {Columns} from "../docx/document/body/columns";
import {DocumentGrid} from "../docx/document/body/doc-grid";
function jsonify(obj: Object) {
var stringifiedJson = JSON.stringify(obj);
@ -13,12 +18,18 @@ describe("Body", () => {
beforeEach(() => {
body = new Body();
body.push(new SectionProperties());
body.push(new PageSize());
body.push(new PageMargin());
body.push(new Columns());
body.push(new DocumentGrid());
});
describe("#constructor()", () => {
it("should create the Section Properties", () => {
var newJson = jsonify(body);
console.log(newJson);
assert.isDefined(newJson.body[0].sectPr);
});