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