Skip to content

Commit 1d03281

Browse files
committed
fix: page size tests
1 parent 18834ef commit 1d03281

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/layout/tests/page/getSize.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ describe('page getSize', () => {
7474
const size = getSize(page);
7575

7676
expect(size).toHaveProperty('width', 100);
77-
expect(size).toHaveProperty('height', undefined);
77+
expect(size).toHaveProperty('height', 100);
7878
});
7979

8080
test('Should accept size number in landscape mode', () => {
8181
const page = { props: { size: 100, orientation: 'landscape' } };
8282
const size = getSize(page);
8383

84-
expect(size).toHaveProperty('width', undefined);
84+
expect(size).toHaveProperty('width', 100);
8585
expect(size).toHaveProperty('height', 100);
8686
});
8787
});

packages/layout/tests/steps/resolvePageSizes.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe('layout resolvePageSizes', () => {
113113
const result = resolvePageSizes(root);
114114

115115
expect(result.children[0].style).toHaveProperty('width', 100);
116-
expect(result.children[0].style).toHaveProperty('height', undefined);
116+
expect(result.children[0].style).toHaveProperty('height', 100);
117117
});
118118

119119
test('Should accept size number in landscape mode', () => {
@@ -125,7 +125,7 @@ describe('layout resolvePageSizes', () => {
125125
};
126126
const result = resolvePageSizes(root);
127127

128-
expect(result.children[0].style).toHaveProperty('width', undefined);
128+
expect(result.children[0].style).toHaveProperty('width', 100);
129129
expect(result.children[0].style).toHaveProperty('height', 100);
130130
});
131131

0 commit comments

Comments
 (0)