score:6

Accepted answer

straight from redux documentation about testing connected components:

in order to be able to test the app component itself without having to deal with the decorator, we recommend you to also export the undecorated component:

import { connect } from 'react-redux'
 
// use named export for unconnected component (for tests)
export class app extends component { /* ... */ }
 
// use default export for the connected component (for app)
export default connect(mapstatetoprops)(app)

then you do just as you expected:

import connectedapp, { app } from '../app';

Related Query

More Query from same tag