Move tests to respective folders as .spec
This is to keep to standards
This commit is contained in:
26
ts/docx/xml-components/attribute.spec.ts
Normal file
26
ts/docx/xml-components/attribute.spec.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { assert } from "chai";
|
||||
|
||||
import { Attributes } from "./";
|
||||
|
||||
describe("Attribute", () => {
|
||||
describe("#constructor()", () => {
|
||||
|
||||
it("should have val as defined with populated constructor", () => {
|
||||
const newAttrs = new Attributes({
|
||||
val: "test",
|
||||
});
|
||||
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", () => {
|
||||
const newAttrs = new Attributes({
|
||||
space: "spaceTest",
|
||||
});
|
||||
const stringifiedJson = JSON.stringify(newAttrs);
|
||||
const newJson = JSON.parse(stringifiedJson);
|
||||
assert.equal(newJson.root.space, "spaceTest");
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user