Last active
August 22, 2018 12:02
-
-
Save erezLieberman/fec54d616915d7c7e58c9bde4fa20eec to your computer and use it in GitHub Desktop.
Revisions
-
Erez Lieberman revised this gist
Aug 22, 2018 . No changes.There are no files selected for viewing
-
Erez Lieberman revised this gist
Aug 22, 2018 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,20 @@ import React from 'react'; import _ from 'lodash'; import { mount, shallow } from 'enzyme'; import NameOfComponent from '../src/NameOfComponent'; describe('NameOfComponent Basic: ', () => { it('should verified that component is exits', () => { const wrapper = mount( <NameOfComponent /> ); expect(wrapper).toHaveLength(1); }); it('should verified that method name component works as as expected', () => { const wrapper = mount(shallow(<NameOfComponent propsname={200} />).get(0)); expect(wrapper.instance().methodName()).toEqual(someValue); }); }); -
Erez Lieberman created this gist
Aug 22, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ import React from 'react'; import _ from 'lodash'; import { mount, shallow } from 'enzyme'; import ProgressBar from '../src/ProgressBar'; describe('ProgressBar Basic: ', () => { it('should verified that component is exits', () => { const wrapper = mount( <ProgressBar /> ); expect(wrapper).toHaveLength(1); }); it('should verified that getWidth component works as as expected', () => { const wrapper = mount(shallow(<ProgressBar total={200} value={15} />).get(0)); wrapper.setState({ noWidth:false }); expect(wrapper.instance().getWidth()).toEqual(7.5); }); });