2023-06-05 00:33:43 +01:00
|
|
|
import { describe, expect, it } from "vitest";
|
2021-11-19 22:30:38 +09:00
|
|
|
|
2022-06-26 23:26:42 +01:00
|
|
|
import { Formatter } from "@export/formatter";
|
2021-11-26 15:07:15 +00:00
|
|
|
import { PageTextDirection, PageTextDirectionType } from "./page-text-direction";
|
2021-11-19 22:30:38 +09:00
|
|
|
|
|
|
|
describe("PageTextDirection", () => {
|
|
|
|
describe("#constructor()", () => {
|
|
|
|
it("should set the direction of the text flow to top-to-bottom-right-to-left", () => {
|
2021-11-26 15:07:15 +00:00
|
|
|
const textDirection = new PageTextDirection(PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT);
|
2021-11-19 22:30:38 +09:00
|
|
|
|
|
|
|
const tree = new Formatter().format(textDirection);
|
|
|
|
|
|
|
|
expect(tree).to.deep.equal({
|
|
|
|
"w:textDirection": {
|
|
|
|
_attr: {
|
|
|
|
"w:val": "tbRl",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|