made all tests passing
This commit is contained in:
@ -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);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user