You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you haven’t decided on a testing strategy yet, we recommend that you start with creating basic smoke tests for your components:
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
});
This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot of value with very little effort so they are great as a starting point, and this is the test you will find in src/App.test.js.
This is no longer the case; since #7881 in 2019, the default test is a more comprehensive test that inspects the rendered output:
[I've taken the liberty of removing the rest of the issue template - this is an issue with the docs, so the troubleshooting and reproduction stuff doesn't really apply]
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Describe the bug
The "Running Tests" documentation currently says:
This is no longer the case; since #7881 in 2019, the default test is a more comprehensive test that inspects the rendered output:
[I've taken the liberty of removing the rest of the issue template - this is an issue with the docs, so the troubleshooting and reproduction stuff doesn't really apply]
The text was updated successfully, but these errors were encountered: