Remove usage of Utility class

This commit is contained in:
Dolan
2019-06-26 22:12:18 +01:00
parent 564a055316
commit a531713214
11 changed files with 182 additions and 99 deletions

View File

@ -1,17 +1,20 @@
import { assert } from "chai";
import { expect } from "chai";
import { Utility } from "tests/utility";
import { Formatter } from "export/formatter";
import { SimplePos } from "./simple-pos";
describe("SimplePos", () => {
describe("#constructor()", () => {
it("should create a element with correct root key", () => {
const newJson = Utility.jsonify(new SimplePos());
assert.equal(newJson.rootKey, "wp:simplePos");
assert.include(newJson.root[0].root, {
x: 0,
y: 0,
const tree = new Formatter().format(new SimplePos());
expect(tree).to.deep.equal({
"wp:simplePos": {
_attr: {
x: 0,
y: 0,
},
},
});
});
});