#940 - Add positional tab feature
Also add extra run elements as per spec
This commit is contained in:
27
src/file/paragraph/run/positional-tab.spec.ts
Normal file
27
src/file/paragraph/run/positional-tab.spec.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
import { PositionalTab, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo } from "./positional-tab";
|
||||
|
||||
describe("PositionalTab", () => {
|
||||
it("should create a PositionalTab with correct root key", () => {
|
||||
const tree = new Formatter().format(
|
||||
new PositionalTab({
|
||||
alignment: PositionalTabAlignment.CENTER,
|
||||
relativeTo: PositionalTabRelativeTo.MARGIN,
|
||||
leader: PositionalTabLeader.DOT,
|
||||
}),
|
||||
);
|
||||
|
||||
expect(tree).to.deep.equal({
|
||||
"w:ptab": {
|
||||
_attr: {
|
||||
"w:alignment": "center",
|
||||
"w:relativeTo": "margin",
|
||||
"w:leader": "dot",
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user