From 01f210e39278798960cd76b178820fd592b5e0c5 Mon Sep 17 00:00:00 2001 From: nixocio Date: Thu, 9 Jul 2020 15:37:19 -0400 Subject: [PATCH] Set React to Strict Mode Set React to Strict Mode. See: https://reactjs.org/docs/strict-mode.html --- awx/ui_next/src/index.jsx | 4 +++- awx/ui_next/src/index.test.jsx | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/index.jsx b/awx/ui_next/src/index.jsx index ea4b815a21..ad616077ef 100644 --- a/awx/ui_next/src/index.jsx +++ b/awx/ui_next/src/index.jsx @@ -7,6 +7,8 @@ import { BrandName } from './variables'; document.title = `Ansible ${BrandName}`; ReactDOM.render( - , + + + , document.getElementById('app') || document.createElement('div') ); diff --git a/awx/ui_next/src/index.test.jsx b/awx/ui_next/src/index.test.jsx index 82dec86c56..44cd66e67c 100644 --- a/awx/ui_next/src/index.test.jsx +++ b/awx/ui_next/src/index.test.jsx @@ -12,6 +12,11 @@ require('./index.jsx'); describe('index.jsx', () => { it('renders ok', () => { - expect(ReactDOM.render).toHaveBeenCalledWith(, div); + expect(ReactDOM.render).toHaveBeenCalledWith( + + + , + div + ); }); });