javascript - What is the purpose of skin-deep? -
let me start saying new react , newer tdd coding in javascript. working on react / redux application testing of our components. our current test suite consists of jasmine, mocha, chai, karma, , skin-deep. of our components using skin-deep (see below -- skin deep )
import sd 'skin-deep'; describe('testing-text-editor', () => { let tree; let instance; let vdom; let field; let fieldinput; let callbackfunction; beforeeach(() => { field = 'description'; fieldinput = '<div>i description</div>'; callbackfunction = () => console.log('foo'); tree = sd.shallowrender(react.createelement(texteditor, { id: field, initialvalue: fieldinput, onsubmit: callbackfunction })); instance = tree.getmountedinstance(); vdom = tree.getrenderoutput(); }); it('testing-render-description', function() { // tests }); })
whenever use skin-deep using on components use shallowrender. wondering if has understanding of skin-deep doing? i've been searching morning description of functionality , purpose yet find satisfying answer.
edit: moved logic beforeeach more descriptive problem
thanks!
Comments
Post a Comment