2018-06-08 16:03:04 +02:00
|
|
|
import { assert } from "chai";
|
|
|
|
|
2018-10-26 01:04:07 +01:00
|
|
|
import { Utility } from "tests/utility";
|
|
|
|
|
2018-06-09 23:49:01 +01:00
|
|
|
import { PositionOffset } from "./position-offset";
|
2018-06-08 16:03:04 +02:00
|
|
|
|
|
|
|
describe("PositionOffset", () => {
|
|
|
|
describe("#constructor()", () => {
|
|
|
|
it("should create a element with correct root key", () => {
|
|
|
|
const newJson = Utility.jsonify(new PositionOffset(50));
|
|
|
|
assert.equal(newJson.rootKey, "wp:posOffset");
|
|
|
|
assert.equal(newJson.root[0], 50);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|