Skip to content

Commit 22cf44c

Browse files
committed
chore: Prettier setup
1 parent 8198923 commit 22cf44c

32 files changed

+9618
-324
lines changed

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "all",
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": true
6+
}
Lines changed: 74 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,115 @@
1-
import { Alignment } from "../../../src/libs/common/alignment.enum";
2-
import { ContentBox } from "../../../src/libs/engine/layout_engine/builder/groups/content_box/content_box";
3-
import { Direction } from "../../../src/libs/common/distribution.enum";
1+
import { Alignment } from '../../../src/libs/common/alignment.enum'
2+
import { ContentBox } from '../../../src/libs/engine/layout_engine/builder/groups/content_box/content_box'
3+
import { Direction } from '../../../src/libs/common/distribution.enum'
44

5-
describe("Content Box", () => {
6-
describe("Row - Top Label", function () {
5+
describe('Content Box', () => {
6+
describe('Row - Top Label', function() {
77
const contentBox = new ContentBox(
88
25,
99
5,
1010
Direction.HORIZONTAL,
1111
Alignment.START,
1212
Alignment.START,
13-
5,()=>{},()=>{},
14-
);
13+
5, () => {
14+
}, () => {
15+
},
16+
)
1517

16-
it("Should initialize and update main length content box reference", async () => {
17-
contentBox.setWidth(100);
18+
it('Should initialize and update main length content box reference', async () => {
19+
contentBox.setWidth(100)
1820

19-
expect(contentBox.getDimension().topLeft.x).toBe(5);
20-
expect(contentBox.getDimension().bottomRight.x).toBe(105);
21-
});
21+
expect(contentBox.getDimension().getLeftBoundary()).toBe(5)
22+
expect(contentBox.getDimension().getRightBoundary()).toBe(105)
23+
})
2224

23-
it("Should initialize and update cross length content box reference", async () => {
24-
contentBox.setHeight(100);
25+
it('Should initialize and update cross length content box reference', async () => {
26+
contentBox.setHeight(100)
2527

26-
expect(contentBox.getDimension().topLeft.y).toBe(25);
27-
expect(contentBox.getDimension().bottomRight.y).toBe(125);
28-
});
29-
});
28+
expect(contentBox.getDimension().getTopBoundary()).toBe(25)
29+
expect(contentBox.getDimension().getBottomBoundary()).toBe(125)
30+
})
31+
})
3032

31-
describe("Row - Lateral Label", function () {
33+
describe('Row - Lateral Label', function() {
3234
const contentBox = new ContentBox(
3335
5,
3436
45,
3537
Direction.HORIZONTAL,
3638
Alignment.START,
3739
Alignment.START,
38-
5,()=>{},()=>{},
39-
);
40+
5, () => {
41+
}, () => {
42+
},
43+
)
4044

41-
it("Should initialize and update main length content box reference", async () => {
42-
contentBox.setWidth(100);
45+
it('Should initialize and update main length content box reference', async () => {
46+
contentBox.setWidth(100)
4347

44-
expect(contentBox.getDimension().topLeft.x).toBe(45);
45-
expect(contentBox.getDimension().bottomRight.x).toBe(145);
46-
});
48+
expect(contentBox.getDimension().getLeftBoundary()).toBe(45)
49+
expect(contentBox.getDimension().getRightBoundary()).toBe(145)
50+
})
4751

48-
it("Should initialize and update cross length content box reference", async () => {
49-
contentBox.setHeight(100);
52+
it('Should initialize and update cross length content box reference', async () => {
53+
contentBox.setHeight(100)
5054

51-
expect(contentBox.getDimension().topLeft.y).toBe(5);
52-
expect(contentBox.getDimension().bottomRight.y).toBe(105);
53-
});
54-
});
55+
expect(contentBox.getDimension().getTopBoundary()).toBe(5)
56+
expect(contentBox.getDimension().getBottomBoundary()).toBe(105)
57+
})
58+
})
5559

56-
describe("Col - Top Label", function () {
60+
describe('Col - Top Label', function() {
5761
const contentBox = new ContentBox(
5862
25,
5963
5,
6064
Direction.VERTICAL,
6165
Alignment.START,
6266
Alignment.START,
63-
5,()=>{},()=>{},
64-
);
67+
5, () => {
68+
}, () => {
69+
},
70+
)
6571

66-
it("Should initialize and update main length content box reference", async () => {
67-
contentBox.setWidth(100);
72+
it('Should initialize and update main length content box reference', async () => {
73+
contentBox.setWidth(100)
6874

69-
expect(contentBox.getDimension().topLeft.x).toBe(5);
70-
expect(contentBox.getDimension().bottomRight.x).toBe(105);
71-
});
75+
expect(contentBox.getDimension().getLeftBoundary()).toBe(5)
76+
expect(contentBox.getDimension().getRightBoundary()).toBe(105)
77+
})
7278

73-
it("Should initialize and update cross length content box reference", async () => {
74-
contentBox.setHeight(100);
79+
it('Should initialize and update cross length content box reference', async () => {
80+
contentBox.setHeight(100)
7581

76-
expect(contentBox.getDimension().topLeft.y).toBe(25);
77-
expect(contentBox.getDimension().bottomRight.y).toBe(125);
78-
});
79-
});
82+
expect(contentBox.getDimension().getTopBoundary()).toBe(25)
83+
expect(contentBox.getDimension().getBottomBoundary()).toBe(125)
84+
})
85+
})
8086

81-
describe("Col - Lateral Label", function () {
87+
describe('Col - Lateral Label', function() {
8288
const contentBox = new ContentBox(
8389
5,
8490
45,
8591
Direction.HORIZONTAL,
8692
Alignment.START,
8793
Alignment.START,
8894
5,
89-
() => {},
90-
() => {}
91-
);
92-
93-
it("Should initialize and update main length content box reference", async () => {
94-
contentBox.setWidth(100);
95-
96-
expect(contentBox.getDimension().topLeft.x).toBe(45);
97-
expect(contentBox.getDimension().bottomRight.x).toBe(145);
98-
});
99-
100-
it("Should initialize and update cross length content box reference", async () => {
101-
contentBox.setHeight(100);
102-
103-
expect(contentBox.getDimension().topLeft.y).toBe(5);
104-
expect(contentBox.getDimension().bottomRight.y).toBe(105);
105-
});
106-
});
107-
});
95+
() => {
96+
},
97+
() => {
98+
},
99+
)
100+
101+
it('Should initialize and update main length content box reference', async () => {
102+
contentBox.setWidth(100)
103+
104+
expect(contentBox.getDimension().getLeftBoundary()).toBe(45)
105+
expect(contentBox.getDimension().getRightBoundary()).toBe(145)
106+
})
107+
108+
it('Should initialize and update cross length content box reference', async () => {
109+
contentBox.setHeight(100)
110+
111+
expect(contentBox.getDimension().getTopBoundary()).toBe(5)
112+
expect(contentBox.getDimension().getBottomBoundary()).toBe(105)
113+
})
114+
})
115+
})

0 commit comments

Comments
 (0)