[fix] babel plugin support for "export" statements

Close #677
This commit is contained in:
Jirat Kijlerdpornpailoj
2017-10-06 11:33:57 +07:00
committed by Nicolas Gallagher
parent 5dd414f9aa
commit 22eebea633
4 changed files with 94 additions and 2 deletions
@@ -24,14 +24,14 @@ describe('components/Switch', () => {
const onValueChange = jest.fn();
const component = shallow(<Switch onValueChange={onValueChange} value={false} />);
component.find('input').simulate('change', { nativeEvent: { target: { checked: true } } });
expect(onValueChange).toHaveBeenCalledWith(true)
expect(onValueChange).toHaveBeenCalledWith(true);
});
test('when value is "true" it receives "false"', () => {
const onValueChange = jest.fn();
const component = shallow(<Switch onValueChange={onValueChange} value />);
component.find('input').simulate('change', { nativeEvent: { target: { checked: false } } });
expect(onValueChange).toHaveBeenCalledWith(false)
expect(onValueChange).toHaveBeenCalledWith(false);
});
});