Add tests to Inventory module
[aai/sparky-fe.git] / test / app / inventory / Inventory.test.js
1 import React from 'react';
2 import thunk from 'redux-thunk';
3
4 import configureMockStore from 'redux-mock-store';
5 import expect from 'expect';
6
7 import Inventory from 'app/inventory/Inventory';
8 import {shallow} from 'enzyme';
9
10
11 const mockStore = configureMockStore([thunk]);
12 const store = mockStore({inventoryReducer: {}});
13
14 describe('Inventory component', () => {
15
16   fetch = require('jest-fetch-mock');
17
18   it('should be rendered', () => {
19
20     // when
21     let wrapper = shallow(
22         <Inventory store={store}/>
23     );
24
25     // then
26     let actual = wrapper.render().text();
27     expect(actual).toInclude('Active Inventory');
28   });
29
30 });

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use