Add test mode (#898)

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Tilman Vatteroth 2020-12-29 17:13:07 +01:00 committed by GitHub
parent e4210ae568
commit dfc2524bd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 9 deletions

View file

@ -23,6 +23,7 @@ import { store } from './redux'
import * as serviceWorkerRegistration from './service-worker-registration'
import './style/dark.scss'
import './style/index.scss'
import { isTestMode } from './utils/is-test-mode'
const Editor = React.lazy(() => import(/* webpackPrefetch: true */ './components/editor/editor'))
@ -80,6 +81,10 @@ ReactDOM.render(
, document.getElementById('root')
)
if (isTestMode()) {
console.log("This build runs in test mode")
}
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA