Documentation and Refactoring (#3028)
* Documentation and Refactoring * Documentation and Refactoring * Fix lint issues * Convert components to Builder style --------- Co-authored-by: Dolan Miu <dmiu@bloomberg.net>
This commit is contained in:
@ -4,13 +4,13 @@ import { Formatter } from "@export/formatter";
|
||||
import { HorizontalPositionAlign } from "@file/shared/alignment";
|
||||
|
||||
import { HorizontalPositionRelativeFrom } from "./floating-position";
|
||||
import { HorizontalPosition } from "./horizontal-position";
|
||||
import { createHorizontalPosition } from "./horizontal-position";
|
||||
|
||||
describe("HorizontalPosition", () => {
|
||||
describe("#constructor()", () => {
|
||||
it("should create a element with position align", () => {
|
||||
const tree = new Formatter().format(
|
||||
new HorizontalPosition({
|
||||
createHorizontalPosition({
|
||||
relative: HorizontalPositionRelativeFrom.MARGIN,
|
||||
align: HorizontalPositionAlign.CENTER,
|
||||
}),
|
||||
@ -31,7 +31,7 @@ describe("HorizontalPosition", () => {
|
||||
|
||||
it("should create a element with offset", () => {
|
||||
const tree = new Formatter().format(
|
||||
new HorizontalPosition({
|
||||
createHorizontalPosition({
|
||||
relative: HorizontalPositionRelativeFrom.MARGIN,
|
||||
offset: 40,
|
||||
}),
|
||||
@ -51,7 +51,7 @@ describe("HorizontalPosition", () => {
|
||||
});
|
||||
|
||||
it("should require one of align or offset", () => {
|
||||
expect(() => new HorizontalPosition({})).to.throw();
|
||||
expect(() => createHorizontalPosition({})).to.throw();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user