Skip to content

Commit

Permalink
fix: adjust Badge line height to the font scale (#3264)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewalczak committed Oct 2, 2022
1 parent b4dbfe7 commit 42cad03
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/__tests__/Badge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ jest.mock('react-native', () => {
return RN;
});

jest.mock('react-native', () => {
const RN = jest.requireActual('react-native');

RN.Dimensions.get = () => ({
fontScale: 1,
});

return RN;
});

it('renders badge', () => {
const tree = renderer.create(<Badge />).toJSON();

Expand Down
4 changes: 4 additions & 0 deletions src/components/__tests__/BottomNavigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jest.mock('react-native', () => {
fontScale: 1,
});

RN.Dimensions.get = () => ({
fontScale: 1,
});

return RN;
});

Expand Down

0 comments on commit 42cad03

Please sign in to comment.