[breaking change] GoodsAction: rename component

This commit is contained in:
陈嘉涵
2019-04-29 16:40:50 +08:00
parent 706f047909
commit 138790b3e3
13 changed files with 114 additions and 114 deletions
+10 -10
View File
@@ -1,10 +1,10 @@
import BigBtn from '../../goods-action-big-btn';
import MiniBtn from '../../goods-action-mini-btn';
import Button from '../../goods-action-button';
import Icon from '../../goods-action-icon';
import { mount } from '../../../test/utils';
test('BigBtn click event', () => {
test('Button click event', () => {
const click = jest.fn();
const wrapper = mount(BigBtn, {
const wrapper = mount(Button, {
context: {
on: {
click
@@ -16,9 +16,9 @@ test('BigBtn click event', () => {
expect(click).toHaveBeenCalledTimes(1);
});
test('MiniBtn click event', () => {
test('Icon click event', () => {
const click = jest.fn();
const wrapper = mount(MiniBtn, {
const wrapper = mount(Icon, {
context: {
on: {
click
@@ -30,20 +30,20 @@ test('MiniBtn click event', () => {
expect(click).toHaveBeenCalledTimes(1);
});
test('BigBtn render default slot', () => {
test('Button render default slot', () => {
const wrapper = mount({
render(h) {
return h(BigBtn, null, ['Default Content']);
return h(Button, null, ['Default Content']);
}
});
expect(wrapper).toMatchSnapshot();
});
test('Mini render default slot', () => {
test('Icon render default slot', () => {
const wrapper = mount({
render(h) {
return h(MiniBtn, null, ['Default Content']);
return h(Icon, null, ['Default Content']);
}
});