Skip to content

Commit

Permalink
More unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darekg11 committed Feb 6, 2019
1 parent 8715f43 commit 702e4b6
Show file tree
Hide file tree
Showing 4 changed files with 293 additions and 15 deletions.
9 changes: 6 additions & 3 deletions src/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ import './App.css';

const store = configureStore();

ReactDOM.render(
const App = () => (
<Provider store={store}>
<MainWindow />
</Provider>,
document.getElementById('root'),
</Provider>
);

ReactDOM.render(<App />, document.getElementById('root') || document.createElement('div'));

KeyboardShourtcutsService.initializeDefaults(store);
WatcherService.initialize(store);

export default App;
15 changes: 15 additions & 0 deletions src/tests/Components/App.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import { expect } from 'chai';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

import App from '../../app/App';

Enzyme.configure({ adapter: new Adapter() });

describe('App component tests', () => {
it('should render', () => {
const wrapper = shallow(<App />);
expect(wrapper).to.have.length(1);
});
});
Loading

0 comments on commit 702e4b6

Please sign in to comment.