linting
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { Attributes } from "../../../docx/xml-components";
|
||||
import { assert } from "chai";
|
||||
import { Attributes } from "../../../docx/xml-components";
|
||||
|
||||
describe("Attribute", () => {
|
||||
let attributes: Attributes;
|
||||
@ -11,28 +11,28 @@ describe("Attribute", () => {
|
||||
describe("#constructor()", () => {
|
||||
|
||||
it("should not add val with empty constructor", () => {
|
||||
let newAttrs = new Attributes();
|
||||
let stringifiedJson = JSON.stringify(newAttrs);
|
||||
let newJson = JSON.parse(stringifiedJson);
|
||||
const newAttrs = new Attributes();
|
||||
const stringifiedJson = JSON.stringify(newAttrs);
|
||||
const newJson = JSON.parse(stringifiedJson);
|
||||
assert.isUndefined(newJson.root.val);
|
||||
});
|
||||
|
||||
it("should have val as defined with populated constructor", () => {
|
||||
let newAttrs = new Attributes({
|
||||
val: "test"
|
||||
const newAttrs = new Attributes({
|
||||
val: "test",
|
||||
});
|
||||
let stringifiedJson = JSON.stringify(newAttrs);
|
||||
let newJson = JSON.parse(stringifiedJson);
|
||||
const stringifiedJson = JSON.stringify(newAttrs);
|
||||
const newJson = JSON.parse(stringifiedJson);
|
||||
assert.equal(newJson.root.val, "test");
|
||||
});
|
||||
|
||||
it("should have space value as defined with populated constructor", () => {
|
||||
let newAttrs = new Attributes({
|
||||
space: "spaceTest"
|
||||
const newAttrs = new Attributes({
|
||||
space: "spaceTest",
|
||||
});
|
||||
let stringifiedJson = JSON.stringify(newAttrs);
|
||||
let newJson = JSON.parse(stringifiedJson);
|
||||
const stringifiedJson = JSON.stringify(newAttrs);
|
||||
const newJson = JSON.parse(stringifiedJson);
|
||||
assert.equal(newJson.root.space, "spaceTest");
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user