Skip to content

Commit

Permalink
fix: page size tests
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomura committed Dec 26, 2024
1 parent 18834ef commit 1d03281
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/layout/tests/page/getSize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ describe('page getSize', () => {
const size = getSize(page);

expect(size).toHaveProperty('width', 100);
expect(size).toHaveProperty('height', undefined);
expect(size).toHaveProperty('height', 100);
});

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

expect(size).toHaveProperty('width', undefined);
expect(size).toHaveProperty('width', 100);
expect(size).toHaveProperty('height', 100);
});
});
4 changes: 2 additions & 2 deletions packages/layout/tests/steps/resolvePageSizes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('layout resolvePageSizes', () => {
const result = resolvePageSizes(root);

expect(result.children[0].style).toHaveProperty('width', 100);
expect(result.children[0].style).toHaveProperty('height', undefined);
expect(result.children[0].style).toHaveProperty('height', 100);
});

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

expect(result.children[0].style).toHaveProperty('width', undefined);
expect(result.children[0].style).toHaveProperty('width', 100);
expect(result.children[0].style).toHaveProperty('height', 100);
});

Expand Down

0 comments on commit 1d03281

Please sign in to comment.