mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Set React to Strict Mode
Set React to Strict Mode. See: https://reactjs.org/docs/strict-mode.html
This commit is contained in:
@@ -7,6 +7,8 @@ import { BrandName } from './variables';
|
|||||||
document.title = `Ansible ${BrandName}`;
|
document.title = `Ansible ${BrandName}`;
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<App />,
|
<React.StrictMode>
|
||||||
|
<App />
|
||||||
|
</React.StrictMode>,
|
||||||
document.getElementById('app') || document.createElement('div')
|
document.getElementById('app') || document.createElement('div')
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ require('./index.jsx');
|
|||||||
|
|
||||||
describe('index.jsx', () => {
|
describe('index.jsx', () => {
|
||||||
it('renders ok', () => {
|
it('renders ok', () => {
|
||||||
expect(ReactDOM.render).toHaveBeenCalledWith(<App />, div);
|
expect(ReactDOM.render).toHaveBeenCalledWith(
|
||||||
|
<React.StrictMode>
|
||||||
|
<App />
|
||||||
|
</React.StrictMode>,
|
||||||
|
div
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user