vant/src/coupon/test/index.spec.ts
neverland 1381070a12
chore: prefer named exports (#8315)
* chore: prefer named exports

* chore: fix import
2021-03-09 15:39:26 +08:00

28 lines
544 B
TypeScript

import { mount } from '../../../test';
import { Coupon } from '..';
const coupon = {
id: 1,
name: 'name',
discount: 0,
denominations: 150,
originCondition: 0,
reason: '',
value: 150,
valueDesc: '1.5',
description: 'description',
startAt: 1489104000,
endAt: 1514592000,
};
test('should render "van-coupon--disabled" class when using disabled prop', () => {
const wrapper = mount(Coupon, {
props: {
coupon,
disabled: true,
},
});
expect(wrapper.classes()).toContain('van-coupon--disabled');
});