mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-13 21:26:44 +03:00
10bf7bc084
* chore(*): upgrade prettier * chore(*): upgrade prettier
46 lines
1.2 KiB
JavaScript
46 lines
1.2 KiB
JavaScript
import React from 'react';
|
|
import { Provider } from 'react-redux';
|
|
import { createStore, applyMiddleware } from 'redux';
|
|
import { mount } from 'enzyme';
|
|
// import { mountToJson } from 'enzyme-to-json';
|
|
import App from '../src/app/containers/App';
|
|
import api from '../src/app/middlewares/api';
|
|
import exportState from '../src/app/middlewares/exportState';
|
|
import rootReducer from '../src/app/reducers';
|
|
|
|
let wrapper;
|
|
|
|
const store = createStore(rootReducer, applyMiddleware(exportState, api));
|
|
|
|
describe('App container', () => {
|
|
beforeAll(() => {
|
|
wrapper = mount(
|
|
<Provider store={store}>
|
|
<App />
|
|
</Provider>
|
|
);
|
|
});
|
|
|
|
/*
|
|
it('should render the App', () => {
|
|
expect(mountToJson(wrapper)).toMatchSnapshot();
|
|
});
|
|
*/
|
|
|
|
it("should render inspector monitor's wrapper", () => {
|
|
expect(wrapper.find('DevtoolsInspector').html()).toBeDefined();
|
|
});
|
|
|
|
it('should contain an empty action list', () => {
|
|
expect(
|
|
wrapper
|
|
.find('ActionList')
|
|
.findWhere((n) => {
|
|
const { className } = n.props();
|
|
return className && className.startsWith('actionListRows-');
|
|
})
|
|
.html()
|
|
).toMatch(/<div class="actionListRows-\d-\d+"><\/div>/);
|
|
});
|
|
});
|