[improvement] rename packages dir to src (#3659)

This commit is contained in:
neverland
2019-06-27 11:25:57 +08:00
committed by GitHub
parent 8489918dca
commit 75c79b7044
619 changed files with 21 additions and 21 deletions
+37
View File
@@ -0,0 +1,37 @@
import SwitchCell from '..';
import { mount } from '../../../test/utils';
test('change event', () => {
const onChange = jest.fn();
const wrapper = mount(SwitchCell, {
context: {
on: {
change: onChange
}
}
});
wrapper.find('.van-switch').trigger('click');
expect(onChange).toHaveBeenCalledWith(true);
});
test('border prop', () => {
const wrapper = mount(SwitchCell, {
propsData: {
border: false
}
});
expect(wrapper).toMatchSnapshot();
});
test('cell-size prop', () => {
const wrapper = mount(SwitchCell, {
propsData: {
cellSize: 'large'
}
});
expect(wrapper).toMatchSnapshot();
});