mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
chore: adjust path of test utils (#4997)
This commit is contained in:
parent
4cd132c0ee
commit
aee1091c5c
@ -2,9 +2,9 @@ module.exports = {
|
||||
moduleFileExtensions: ['js', 'jsx', 'vue', 'ts', 'tsx'],
|
||||
transform: {
|
||||
'\\.(vue)$': 'vue-jest',
|
||||
'\\.(js|jsx|ts|tsx)$': '<rootDir>/test/jest.transform.js',
|
||||
'\\.(js|jsx|ts|tsx)$': '<rootDir>/test/transformer.js',
|
||||
},
|
||||
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
|
||||
snapshotSerializers: ['jest-serializer-vue'],
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.{js,jsx,ts,tsx,vue}',
|
||||
'!**/style/**',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
import ActionSheet from '..';
|
||||
|
||||
test('callback events', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import AddressEdit from '..';
|
||||
import areaList from '../../area/demo/area.simple';
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
|
||||
const addressInfo = {
|
||||
name: '测试',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
import AddressList from '..';
|
||||
|
||||
const list = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Area from '..';
|
||||
import areaList from '../demo/area.simple';
|
||||
import { mount, later, triggerDrag } from '../../../test/utils';
|
||||
import { mount, later, triggerDrag } from '../../../test';
|
||||
|
||||
const firstOption = [
|
||||
{ code: '110000', name: '北京市' },
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
import Button from '..';
|
||||
|
||||
test('loading size', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Card from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('click event', () => {
|
||||
const onClick = jest.fn();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Cell from '..';
|
||||
import CellGroup from '../../cell-group';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('click event', () => {
|
||||
const click = jest.fn();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import Checkbox from '..';
|
||||
import CheckboxGroup from '../../checkbox-group';
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
|
||||
Vue.use(Checkbox);
|
||||
Vue.use(CheckboxGroup);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import Circle from '..';
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
|
||||
test('speed is 0', async () => {
|
||||
const wrapper = mount(Circle, {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Col from '..';
|
||||
import Row from '../../row';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('Col click event', () => {
|
||||
const wrapper = mount(Col);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import Collapse from '..';
|
||||
import CollapseItem from '../../collapse-item';
|
||||
import { later, mount } from '../../../test/utils';
|
||||
import { later, mount } from '../../../test';
|
||||
|
||||
Vue.use(Collapse);
|
||||
Vue.use(CollapseItem);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ContactCard from '..';
|
||||
import ContactList from '../../contact-list';
|
||||
import ContactEdit from '../../contact-edit';
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
|
||||
const contactInfo = {
|
||||
name: 'test',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import CountDown from '..';
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
|
||||
Vue.use(CountDown);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Coupon from '../../coupon';
|
||||
import CouponList from '..';
|
||||
import CouponCell from '../../coupon-cell';
|
||||
import { later, mount } from '../../../test/utils';
|
||||
import { later, mount } from '../../../test';
|
||||
|
||||
const coupon = {
|
||||
id: 1,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import DatePicker from '../DatePicker';
|
||||
import { mount, later, triggerDrag } from '../../../test/utils';
|
||||
import { mount, later, triggerDrag } from '../../../test';
|
||||
|
||||
function filter(type, options) {
|
||||
const mod = type === 'year' ? 10 : 5;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import DatetimePicker from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('confirm & cancel event', () => {
|
||||
const onConfirm = jest.fn();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import TimePicker from '../TimePicker';
|
||||
import { mount, later, triggerDrag } from '../../../test/utils';
|
||||
import { mount, later, triggerDrag } from '../../../test';
|
||||
|
||||
function filter(type, options) {
|
||||
const mod = type === 'minute' ? 10 : 5;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import Dialog from '..';
|
||||
import DialogComponent from '../Dialog';
|
||||
import { mount, later, trigger } from '../../../test/utils';
|
||||
import { mount, later, trigger } from '../../../test';
|
||||
|
||||
test('Dialog function call', async () => {
|
||||
Dialog.close();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
import Vue from 'vue';
|
||||
import DropdownMenu from '..';
|
||||
import DropdownItem from '../../dropdown-item';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Field from '..';
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
|
||||
test('input event', () => {
|
||||
const wrapper = mount(Field);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Button from '../../goods-action-button';
|
||||
import Icon from '../../goods-action-icon';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('Button click event', () => {
|
||||
const wrapper = mount(Button);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import Grid from '..';
|
||||
import GridItem from '../../grid-item';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
Vue.use(Grid);
|
||||
Vue.use(GridItem);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Icon from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('render icon with builtin icon name', () => {
|
||||
const wrapper = mount(Icon, {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import ImagePreview from '..';
|
||||
import ImagePreviewVue from '../ImagePreview';
|
||||
import { mount, trigger, triggerDrag, later } from '../../../test/utils';
|
||||
import { mount, trigger, triggerDrag, later } from '../../../test';
|
||||
|
||||
function triggerZoom(el, x, y) {
|
||||
trigger(el, 'touchstart', 0, 0, { x, y });
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
import Image from '..';
|
||||
|
||||
test('click event', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import IndexBar from '..';
|
||||
import IndexAnchor from '../../index-anchor';
|
||||
import { mount, trigger, triggerDrag } from '../../../test/utils';
|
||||
import { mount, trigger, triggerDrag } from '../../../test';
|
||||
|
||||
Vue.use(IndexBar);
|
||||
Vue.use(IndexAnchor);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Info from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('should not render when info is empty string', () => {
|
||||
const wrapper = mount(Info, {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import List from '..';
|
||||
import { mount, later, mockGetBoundingClientRect } from '../../../test/utils';
|
||||
import { mount, later, mockGetBoundingClientRect } from '../../../test';
|
||||
|
||||
test('load event', async () => {
|
||||
const wrapper = mount(List);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
import Loading from '..';
|
||||
|
||||
test('size prop', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import NavBar from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('render left & right slot', () => {
|
||||
const wrapper = mount(NavBar, {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import NoticeBar from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('click event', () => {
|
||||
const wrapper = mount(NoticeBar);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Notify from '..';
|
||||
import { later } from '../../../test/utils';
|
||||
import { later } from '../../../test';
|
||||
|
||||
test('create a notify', async () => {
|
||||
// should not cause error when call clear before show notify
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import NumberKeyboard from '..';
|
||||
import { mount, trigger } from '../../../test/utils';
|
||||
import { mount, trigger } from '../../../test';
|
||||
|
||||
function clickKey(key) {
|
||||
trigger(key, 'touchstart');
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
import Overlay from '..';
|
||||
|
||||
test('z-index prop', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import PasswordInput from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('focus event', () => {
|
||||
const focus = jest.fn();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Picker from '..';
|
||||
import PickerColumn from '../PickerColumn';
|
||||
import { mount, triggerDrag, later } from '../../../test/utils';
|
||||
import { mount, triggerDrag, later } from '../../../test';
|
||||
|
||||
const simpleColumn = ['1990', '1991', '1992', '1993', '1994', '1995'];
|
||||
const columns = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Popup from '..';
|
||||
import { mount, triggerDrag, later } from '../../../test/utils';
|
||||
import { mount, triggerDrag, later } from '../../../test';
|
||||
|
||||
let wrapper;
|
||||
afterEach(() => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Progress from '..';
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
|
||||
test('calc width', async () => {
|
||||
const wrapper = mount(Progress, {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import PullRefresh from '..';
|
||||
import { mount, later, trigger, triggerDrag } from '../../../test/utils';
|
||||
import { mount, later, trigger, triggerDrag } from '../../../test';
|
||||
|
||||
test('change head content when pulling down', async () => {
|
||||
const wrapper = mount(PullRefresh, {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import Radio from '..';
|
||||
import RadioGroup from '../../radio-group';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
Vue.use(Radio);
|
||||
Vue.use(RadioGroup);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Rate from '..';
|
||||
import { mount, triggerDrag } from '../../../test/utils';
|
||||
import { mount, triggerDrag } from '../../../test';
|
||||
|
||||
function mockGetBoundingClientRect(items) {
|
||||
items.filter((icon, index) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Search from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('input event', () => {
|
||||
const onInput = jest.fn();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
import Vue from 'vue';
|
||||
import Sidebar from '..';
|
||||
import SidebarItem from '../../sidebar-item';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
import Skeleton from '..';
|
||||
|
||||
test('row-width array', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
trigger,
|
||||
triggerDrag,
|
||||
mockGetBoundingClientRect
|
||||
} from '../../../test/utils';
|
||||
} from '../../../test';
|
||||
|
||||
function mockRect(vertical) {
|
||||
return mockGetBoundingClientRect({
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Stepper from '..';
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test';
|
||||
|
||||
test('disabled stepper', () => {
|
||||
const wrapper = mount(Stepper, {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
import Steps from '..';
|
||||
import Step from '../../step';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount, mockScrollTop } from '../../../test/utils';
|
||||
import { mount, mockScrollTop } from '../../../test';
|
||||
import Vue from 'vue';
|
||||
import Sticky from '..';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import SubmitBar from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('submit event', () => {
|
||||
const submit = jest.fn();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
demoTest(Demo);
|
||||
snapshotDemo(Demo);
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
triggerDrag,
|
||||
later,
|
||||
mockGetBoundingClientRect
|
||||
} from '../../../test/utils';
|
||||
} from '../../../test';
|
||||
|
||||
const THRESHOLD = 0.15;
|
||||
const defaultProps = {
|
||||
|
@ -1,17 +1,17 @@
|
||||
import Demo from '../demo';
|
||||
import demoTest from '../../../test/demo-test';
|
||||
import { mockGetBoundingClientRect } from '../../../test/utils';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
import { mockGetBoundingClientRect } from '../../../test';
|
||||
|
||||
let restore;
|
||||
|
||||
demoTest(Demo, {
|
||||
hookBeforeTest: () => {
|
||||
snapshotDemo(Demo, {
|
||||
beforeTest: () => {
|
||||
restore = mockGetBoundingClientRect({
|
||||
width: 100,
|
||||
height: 100
|
||||
});
|
||||
},
|
||||
hookAfterTest: () => {
|
||||
afterTest: () => {
|
||||
restore();
|
||||
}
|
||||
});
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user