fixed all tests
This commit is contained in:
@ -7,7 +7,7 @@ export class Formatter {
|
|||||||
this.replaceKeys(input);
|
this.replaceKeys(input);
|
||||||
input.clearVariables();
|
input.clearVariables();
|
||||||
var newJson = this.clense(input);
|
var newJson = this.clense(input);
|
||||||
console.log(JSON.stringify(newJson, null, " "));
|
//console.log(JSON.stringify(newJson, null, " "));
|
||||||
return newJson;
|
return newJson;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,8 @@ describe("Formatter", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should should change 'p' tag into 'w:p' tag", () => {
|
it("should should change 'p' tag into 'w:p' tag", () => {
|
||||||
var newJson = formatter.format({ "p": "test", "xmlKeys": { "p": "w:p" } });
|
var paragraph = new docx.Paragraph();
|
||||||
|
var newJson = formatter.format(paragraph);
|
||||||
assert.isDefined(newJson["w:p"]);
|
assert.isDefined(newJson["w:p"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ describe('TextRun', () => {
|
|||||||
it("should add text into run", () => {
|
it("should add text into run", () => {
|
||||||
run = new TextRun("test");
|
run = new TextRun("test");
|
||||||
var newJson = jsonify(run);
|
var newJson = jsonify(run);
|
||||||
console.log(newJson.root[1].root)
|
|
||||||
assert.equal(newJson.root[1].root, "test");
|
assert.equal(newJson.root[1].root, "test");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user