| Total Complexity | 3 |
| Complexity/F | 1 |
| Lines of Code | 22 |
| Function Count | 3 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import expect from 'expect'; |
||
| 2 | import { prefix } from './../../src/util/prefix'; |
||
| 3 | |||
| 4 | describe('prefix utility function', () => { |
||
| 5 | |||
| 6 | it('Should work with a destructured array of classes', () => { |
||
| 7 | const classes = ['react', 'redux', 'grid', 'test']; |
||
| 8 | |||
| 9 | expect( |
||
| 10 | prefix(...classes) |
||
| 11 | ).toEqual( |
||
| 12 | 'react-grid-react react-grid-redux react-grid-grid react-grid-test' |
||
| 13 | ); |
||
| 14 | }); |
||
| 15 | |||
| 16 | it('Should work with a single class', () => { |
||
| 17 | const cls = 'test-class'; |
||
| 18 | |||
| 19 | expect(prefix(cls)).toEqual('react-grid-test-class'); |
||
| 20 | }); |
||
| 21 | |||
| 22 | }); |