import React from 'react'; import { shallow } from 'enzyme'; import assert from 'assert'; import WeUI from '../src/index'; const {CellHeader} = WeUI; describe('', ()=> { ['cell header wording', ,

cell header wording

].map((child)=>{ describe(`${child}`, ()=>{ const customClassName = 'customClassName1 customClassName2'; const wrapper = shallow( {child} ); it(`should have 'weui-cell__hd' class name`, ()=>{ assert(wrapper.hasClass(`weui-cell__hd`)); }); it(`should have custom class name ${customClassName}`, ()=> { assert(wrapper.hasClass(customClassName)); }); it(`should have child ${child}`, ()=>{ assert(wrapper.contains(child)); }); }); }); });