fix(react): eliminate use of deprecated findDOMNode, resolves #20972

This commit is contained in:
Ely Lucas
2020-11-25 14:21:12 -07:00
committed by GitHub
parent ea52db66f0
commit 5275332e43
3 changed files with 29 additions and 4 deletions

View File

@ -49,6 +49,21 @@ describe('createComponent - ref', () => {
});
});
describe('createComponent - strict mode', () => {
beforeEach(() => (console.error = (...data: any[]) => {
throw new Error(...data);
}));
test('should work without errors in strict mode', () => {
const renderResult = render(
<React.StrictMode>
<IonButton>Strict Mode Rocks</IonButton>
</React.StrictMode>
);
expect(renderResult.getByText(/Rocks/)).toBeTruthy();
});
});
describe('when working with css classes', () => {
const myClass = 'my-class'
const myClass2 = 'my-class2'