| Total Complexity | 5 |
| Complexity/F | 1 |
| Lines of Code | 70 |
| Function Count | 5 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | /* eslint-enable describe it */ |
||
| 2 | import expect from 'expect'; |
||
| 3 | |||
| 4 | import { |
||
| 5 | rootReducer, |
||
| 6 | Reducers |
||
| 7 | } from './../../src/reducers'; |
||
| 8 | |||
| 9 | describe('Grid reducer exports', () => { |
||
| 10 | |||
| 11 | const reducerList = Object.keys( |
||
| 12 | Reducers |
||
| 13 | ); |
||
| 14 | |||
| 15 | it('Should export a root reducer as a function', () => { |
||
| 16 | expect( |
||
| 17 | rootReducer |
||
| 18 | ).toBeA('function'); |
||
| 19 | }); |
||
| 20 | |||
| 21 | it('Should export a Reducers object', () => { |
||
| 22 | expect( |
||
| 23 | typeof Reducers |
||
| 24 | ).toEqual('object'); |
||
| 25 | }); |
||
| 26 | |||
| 27 | it('Should export a Reducers object', () => { |
||
| 28 | expect( |
||
| 29 | reducerList.length |
||
| 30 | ).toEqual(9); |
||
| 31 | }); |
||
| 32 | |||
| 33 | it('Should export all reducers', () => { |
||
| 34 | expect( |
||
| 35 | reducerList.indexOf('BulkActions') |
||
| 36 | ).toNotEqual(-1); |
||
| 37 | |||
| 38 | expect( |
||
| 39 | reducerList.indexOf('DataSource') |
||
| 40 | ).toNotEqual(-1); |
||
| 41 | |||
| 42 | expect( |
||
| 43 | reducerList.indexOf('Editor') |
||
| 44 | ).toNotEqual(-1); |
||
| 45 | |||
| 46 | expect( |
||
| 47 | reducerList.indexOf('ErrorHandler') |
||
| 48 | ).toNotEqual(-1); |
||
| 49 | |||
| 50 | expect( |
||
| 51 | reducerList.indexOf('Grid') |
||
| 52 | ).toNotEqual(-1); |
||
| 53 | |||
| 54 | expect( |
||
| 55 | reducerList.indexOf('Loader') |
||
| 56 | ).toNotEqual(-1); |
||
| 57 | |||
| 58 | expect( |
||
| 59 | reducerList.indexOf('Menu') |
||
| 60 | ).toNotEqual(-1); |
||
| 61 | |||
| 62 | expect( |
||
| 63 | reducerList.indexOf('Pager') |
||
| 64 | ).toNotEqual(-1); |
||
| 65 | |||
| 66 | expect( |
||
| 67 | reducerList.indexOf('Selection') |
||
| 68 | ).toNotEqual(-1); |
||
| 69 | }); |
||
| 70 | |||
| 71 | }); |
||
| 72 |