Skip to content

Commit

Permalink
fix(cli): wrap App component in CustomDataProvider in boilerplate test (
Browse files Browse the repository at this point in the history
  • Loading branch information
mediremi committed Oct 13, 2021
1 parent 230c73c commit 88be6eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 7 additions & 1 deletion cli/config/init.App.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import { CustomDataProvider } from '@dhis2/app-runtime'
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)
ReactDOM.render(
<CustomDataProvider>
<App />
</CustomDataProvider>,
div
)
ReactDOM.unmountComponentAtNode(div)
})
8 changes: 1 addition & 7 deletions shell/src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import { CustomDataProvider } from '@dhis2/app-runtime'
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'

it('renders without crashing', () => {
const div = document.createElement('div')
ReactDOM.render(
<CustomDataProvider>
<App />
</CustomDataProvider>,
div
)
ReactDOM.render(<App />, div)
ReactDOM.unmountComponentAtNode(div)
})

0 comments on commit 88be6eb

Please sign in to comment.