Skip to content

Commit 9f64d9b

Browse files
committed
remove onResize test
1 parent a6e2ced commit 9f64d9b

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

packages/spectacle/src/components/typography.test.tsx

-23
Original file line numberDiff line numberDiff line change
@@ -120,27 +120,4 @@ describe('<FitText />', () => {
120120
expect(textElement).toHaveStyle({ color: defaultTheme.colors.secondary });
121121
expect(textElement).toHaveStyle({ fontSize: 'h1' });
122122
});
123-
124-
it('should scale text when container size changes', () => {
125-
// Simulate a container that's smaller than the text
126-
jest.mock('use-resize-observer', () => {
127-
return { width: 100, height: 100 };
128-
});
129-
130-
const { container } = mountWithTheme(
131-
<FitText>Long text that needs scaling</FitText>
132-
);
133-
const scaledText = container.querySelector('div[scale]');
134-
expect(scaledText).toHaveStyle({ transform: 'scale(1)' }); // TODO: Not sure if this is a great test / expected.
135-
});
136-
137-
it('should center text in container', () => {
138-
const { container } = mountWithTheme(<FitText>Centered text</FitText>);
139-
const fitContainer = container.firstChild;
140-
expect(fitContainer).toHaveStyle({
141-
display: 'flex',
142-
alignItems: 'center',
143-
justifyContent: 'center'
144-
});
145-
});
146123
});

0 commit comments

Comments
 (0)