Skip to content

Commit

Permalink
fix: clean up, add useless test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp committed Jan 25, 2023
1 parent 30c963c commit b14952b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
1 change: 0 additions & 1 deletion services/plugin/src/PluginSender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export const PluginSender = ({
)

useEffect(() => {
console.log('pluginsender props update')
if (iframeRef?.current) {
const iframeProps = { ...propsToPass, updateMissingProps }

Expand Down
4 changes: 0 additions & 4 deletions services/plugin/src/PluginWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,5 @@ export const PluginWrapper = ({
return () => listener.cancel()
}, [receivePropsFromParent])

useEffect(() => {
console.log('pluginwrapper rerender')
})

return children({ ...propsFromParent })
}
20 changes: 20 additions & 0 deletions services/plugin/src/__tests__/integration.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as React from 'react'
import PluginError from '../PluginError'

// empty tests (to no trigger test failure)
describe('<PluginError />', () => {
it('should render without failing', async () => {
const missingEntryPoint = false
const showDownload = false
const appShortName = 'some_app'
const missingProps = null
const wrapper = () => (
<PluginError
missingEntryPoint={missingEntryPoint}
showDownload={showDownload}
appShortName={appShortName}
missingProps={missingProps}
/>
)
})
})

0 comments on commit b14952b

Please sign in to comment.