fixed all tslint errors
This commit is contained in:
@ -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");
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user