fixed attribute

This commit is contained in:
Dolan Miu
2016-04-05 01:49:12 +01:00
parent d197a2c717
commit d4c2b10285
9 changed files with 46 additions and 24 deletions

View File

@ -26,11 +26,16 @@ describe("Formatter", () => {
var paragraph = new docx.Paragraph();
var newJson = formatter.format(paragraph);
newJson = jsonify(newJson);
console.log(JSON.stringify(newJson, null, " "));
assert.isDefined(newJson["w:p"]);
});
it("should remove xmlKeys", () => {
var paragraph = new docx.Paragraph();
var newJson = formatter.format(paragraph);
var stringifiedJson = JSON.stringify(newJson);
assert(stringifiedJson.indexOf("xmlKeys") < 0);
});
it("should format simple paragraph with bold text", () => {
var paragraph = new docx.Paragraph();
paragraph.addText(new docx.TextRun("test").bold());
@ -62,14 +67,14 @@ describe("Formatter", () => {
assert.isDefined(newJson["w:p"]);
});
it.only("should format Properties object correctly", () => {
it("should format Properties object correctly", () => {
var properties = new Properties({
title: "test document",
creator: "Dolan"
});
var newJson = formatter.format(properties);
newJson = jsonify(newJson);
console.log(JSON.stringify(newJson, null, " "));
assert.isDefined(newJson["cp:coreProperties"]);
});
});
});