fixed all tslint errors

This commit is contained in:
Dolan Miu
2016-05-26 15:08:34 +01:00
parent f075d3b719
commit a2284df881
42 changed files with 253 additions and 254 deletions

View File

@ -4,36 +4,36 @@ import {Attributes} from "../docx/xml-components";
import {assert} from "chai";
describe("Attribute", () => {
var attributes: Attributes;
let attributes: Attributes;
beforeEach(() => {
attributes = new Attributes();
});
describe('#constructor()', () => {
describe("#constructor()", () => {
it("should not add val with empty constructor", () => {
var newAttrs = new Attributes();
var stringifiedJson = JSON.stringify(newAttrs);
var newJson = JSON.parse(stringifiedJson);
let newAttrs = new Attributes();
let stringifiedJson = JSON.stringify(newAttrs);
let newJson = JSON.parse(stringifiedJson);
assert.isUndefined(newJson.root.val);
});
it("should have val as defined with populated constructor", () => {
var newAttrs = new Attributes({
let newAttrs = new Attributes({
val: "test"
});
var stringifiedJson = JSON.stringify(newAttrs);
var newJson = JSON.parse(stringifiedJson);
let stringifiedJson = JSON.stringify(newAttrs);
let newJson = JSON.parse(stringifiedJson);
assert.equal(newJson.root.val, "test");
});
it("should have space value as defined with populated constructor", () => {
var newAttrs = new Attributes({
let newAttrs = new Attributes({
space: "spaceTest"
});
var stringifiedJson = JSON.stringify(newAttrs);
var newJson = JSON.parse(stringifiedJson);
let stringifiedJson = JSON.stringify(newAttrs);
let newJson = JSON.parse(stringifiedJson);
assert.equal(newJson.root.space, "spaceTest");
});
});