chore: adjust path of test utils (#4997)

This commit is contained in:
neverland 2019-11-13 16:46:01 +08:00 committed by GitHub
parent 4cd132c0ee
commit aee1091c5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
125 changed files with 231 additions and 220 deletions

View File

@ -2,9 +2,9 @@ module.exports = {
moduleFileExtensions: ['js', 'jsx', 'vue', 'ts', 'tsx'], moduleFileExtensions: ['js', 'jsx', 'vue', 'ts', 'tsx'],
transform: { transform: {
'\\.(vue)$': 'vue-jest', '\\.(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: [ collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx,vue}', 'src/**/*.{js,jsx,ts,tsx,vue}',
'!**/style/**', '!**/style/**',

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
import ActionSheet from '..'; import ActionSheet from '..';
test('callback events', () => { test('callback events', () => {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,6 +1,6 @@
import AddressEdit from '..'; import AddressEdit from '..';
import areaList from '../../area/demo/area.simple'; import areaList from '../../area/demo/area.simple';
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
const addressInfo = { const addressInfo = {
name: '测试', name: '测试',

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
import AddressList from '..'; import AddressList from '..';
const list = [ const list = [

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,6 +1,6 @@
import Area from '..'; import Area from '..';
import areaList from '../demo/area.simple'; import areaList from '../demo/area.simple';
import { mount, later, triggerDrag } from '../../../test/utils'; import { mount, later, triggerDrag } from '../../../test';
const firstOption = [ const firstOption = [
{ code: '110000', name: '北京市' }, { code: '110000', name: '北京市' },

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
import Button from '..'; import Button from '..';
test('loading size', () => { test('loading size', () => {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import Card from '..'; import Card from '..';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('click event', () => { test('click event', () => {
const onClick = jest.fn(); const onClick = jest.fn();

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,6 +1,6 @@
import Cell from '..'; import Cell from '..';
import CellGroup from '../../cell-group'; import CellGroup from '../../cell-group';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('click event', () => { test('click event', () => {
const click = jest.fn(); const click = jest.fn();

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Checkbox from '..'; import Checkbox from '..';
import CheckboxGroup from '../../checkbox-group'; import CheckboxGroup from '../../checkbox-group';
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
Vue.use(Checkbox); Vue.use(Checkbox);
Vue.use(CheckboxGroup); Vue.use(CheckboxGroup);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,6 +1,6 @@
import Vue from 'vue'; import Vue from 'vue';
import Circle from '..'; import Circle from '..';
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
test('speed is 0', async () => { test('speed is 0', async () => {
const wrapper = mount(Circle, { const wrapper = mount(Circle, {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,6 +1,6 @@
import Col from '..'; import Col from '..';
import Row from '../../row'; import Row from '../../row';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('Col click event', () => { test('Col click event', () => {
const wrapper = mount(Col); const wrapper = mount(Col);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Collapse from '..'; import Collapse from '..';
import CollapseItem from '../../collapse-item'; import CollapseItem from '../../collapse-item';
import { later, mount } from '../../../test/utils'; import { later, mount } from '../../../test';
Vue.use(Collapse); Vue.use(Collapse);
Vue.use(CollapseItem); Vue.use(CollapseItem);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,7 +1,7 @@
import ContactCard from '..'; import ContactCard from '..';
import ContactList from '../../contact-list'; import ContactList from '../../contact-list';
import ContactEdit from '../../contact-edit'; import ContactEdit from '../../contact-edit';
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
const contactInfo = { const contactInfo = {
name: 'test', name: 'test',

View File

@ -1,6 +1,6 @@
import Vue from 'vue'; import Vue from 'vue';
import CountDown from '..'; import CountDown from '..';
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
Vue.use(CountDown); Vue.use(CountDown);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,7 +1,7 @@
import Coupon from '../../coupon'; import Coupon from '../../coupon';
import CouponList from '..'; import CouponList from '..';
import CouponCell from '../../coupon-cell'; import CouponCell from '../../coupon-cell';
import { later, mount } from '../../../test/utils'; import { later, mount } from '../../../test';
const coupon = { const coupon = {
id: 1, id: 1,

View File

@ -1,5 +1,5 @@
import DatePicker from '../DatePicker'; import DatePicker from '../DatePicker';
import { mount, later, triggerDrag } from '../../../test/utils'; import { mount, later, triggerDrag } from '../../../test';
function filter(type, options) { function filter(type, options) {
const mod = type === 'year' ? 10 : 5; const mod = type === 'year' ? 10 : 5;

View File

@ -1,5 +1,5 @@
import DatetimePicker from '..'; import DatetimePicker from '..';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('confirm & cancel event', () => { test('confirm & cancel event', () => {
const onConfirm = jest.fn(); const onConfirm = jest.fn();

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import TimePicker from '../TimePicker'; import TimePicker from '../TimePicker';
import { mount, later, triggerDrag } from '../../../test/utils'; import { mount, later, triggerDrag } from '../../../test';
function filter(type, options) { function filter(type, options) {
const mod = type === 'minute' ? 10 : 5; const mod = type === 'minute' ? 10 : 5;

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Dialog from '..'; import Dialog from '..';
import DialogComponent from '../Dialog'; import DialogComponent from '../Dialog';
import { mount, later, trigger } from '../../../test/utils'; import { mount, later, trigger } from '../../../test';
test('Dialog function call', async () => { test('Dialog function call', async () => {
Dialog.close(); Dialog.close();

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
import Vue from 'vue'; import Vue from 'vue';
import DropdownMenu from '..'; import DropdownMenu from '..';
import DropdownItem from '../../dropdown-item'; import DropdownItem from '../../dropdown-item';

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import Field from '..'; import Field from '..';
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
test('input event', () => { test('input event', () => {
const wrapper = mount(Field); const wrapper = mount(Field);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,6 +1,6 @@
import Button from '../../goods-action-button'; import Button from '../../goods-action-button';
import Icon from '../../goods-action-icon'; import Icon from '../../goods-action-icon';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('Button click event', () => { test('Button click event', () => {
const wrapper = mount(Button); const wrapper = mount(Button);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Grid from '..'; import Grid from '..';
import GridItem from '../../grid-item'; import GridItem from '../../grid-item';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
Vue.use(Grid); Vue.use(Grid);
Vue.use(GridItem); Vue.use(GridItem);

View File

@ -1,5 +1,5 @@
import Icon from '..'; import Icon from '..';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('render icon with builtin icon name', () => { test('render icon with builtin icon name', () => {
const wrapper = mount(Icon, { const wrapper = mount(Icon, {

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
import ImagePreview from '..'; import ImagePreview from '..';
import ImagePreviewVue from '../ImagePreview'; import ImagePreviewVue from '../ImagePreview';
import { mount, trigger, triggerDrag, later } from '../../../test/utils'; import { mount, trigger, triggerDrag, later } from '../../../test';
function triggerZoom(el, x, y) { function triggerZoom(el, x, y) {
trigger(el, 'touchstart', 0, 0, { x, y }); trigger(el, 'touchstart', 0, 0, { x, y });

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
import Image from '..'; import Image from '..';
test('click event', () => { test('click event', () => {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
import IndexBar from '..'; import IndexBar from '..';
import IndexAnchor from '../../index-anchor'; import IndexAnchor from '../../index-anchor';
import { mount, trigger, triggerDrag } from '../../../test/utils'; import { mount, trigger, triggerDrag } from '../../../test';
Vue.use(IndexBar); Vue.use(IndexBar);
Vue.use(IndexAnchor); Vue.use(IndexAnchor);

View File

@ -1,5 +1,5 @@
import Info from '..'; import Info from '..';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('should not render when info is empty string', () => { test('should not render when info is empty string', () => {
const wrapper = mount(Info, { const wrapper = mount(Info, {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import List from '..'; import List from '..';
import { mount, later, mockGetBoundingClientRect } from '../../../test/utils'; import { mount, later, mockGetBoundingClientRect } from '../../../test';
test('load event', async () => { test('load event', async () => {
const wrapper = mount(List); const wrapper = mount(List);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
import Loading from '..'; import Loading from '..';
test('size prop', () => { test('size prop', () => {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import NavBar from '..'; import NavBar from '..';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('render left & right slot', () => { test('render left & right slot', () => {
const wrapper = mount(NavBar, { const wrapper = mount(NavBar, {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import NoticeBar from '..'; import NoticeBar from '..';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('click event', () => { test('click event', () => {
const wrapper = mount(NoticeBar); const wrapper = mount(NoticeBar);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import Notify from '..'; import Notify from '..';
import { later } from '../../../test/utils'; import { later } from '../../../test';
test('create a notify', async () => { test('create a notify', async () => {
// should not cause error when call clear before show notify // should not cause error when call clear before show notify

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import NumberKeyboard from '..'; import NumberKeyboard from '..';
import { mount, trigger } from '../../../test/utils'; import { mount, trigger } from '../../../test';
function clickKey(key) { function clickKey(key) {
trigger(key, 'touchstart'); trigger(key, 'touchstart');

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
import Overlay from '..'; import Overlay from '..';
test('z-index prop', () => { test('z-index prop', () => {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import PasswordInput from '..'; import PasswordInput from '..';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('focus event', () => { test('focus event', () => {
const focus = jest.fn(); const focus = jest.fn();

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,6 +1,6 @@
import Picker from '..'; import Picker from '..';
import PickerColumn from '../PickerColumn'; 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 simpleColumn = ['1990', '1991', '1992', '1993', '1994', '1995'];
const columns = [ const columns = [

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import Popup from '..'; import Popup from '..';
import { mount, triggerDrag, later } from '../../../test/utils'; import { mount, triggerDrag, later } from '../../../test';
let wrapper; let wrapper;
afterEach(() => { afterEach(() => {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import Progress from '..'; import Progress from '..';
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
test('calc width', async () => { test('calc width', async () => {
const wrapper = mount(Progress, { const wrapper = mount(Progress, {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import PullRefresh from '..'; 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 () => { test('change head content when pulling down', async () => {
const wrapper = mount(PullRefresh, { const wrapper = mount(PullRefresh, {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Radio from '..'; import Radio from '..';
import RadioGroup from '../../radio-group'; import RadioGroup from '../../radio-group';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
Vue.use(Radio); Vue.use(Radio);
Vue.use(RadioGroup); Vue.use(RadioGroup);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import Rate from '..'; import Rate from '..';
import { mount, triggerDrag } from '../../../test/utils'; import { mount, triggerDrag } from '../../../test';
function mockGetBoundingClientRect(items) { function mockGetBoundingClientRect(items) {
items.filter((icon, index) => { items.filter((icon, index) => {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import Search from '..'; import Search from '..';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('input event', () => { test('input event', () => {
const onInput = jest.fn(); const onInput = jest.fn();

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
import Vue from 'vue'; import Vue from 'vue';
import Sidebar from '..'; import Sidebar from '..';
import SidebarItem from '../../sidebar-item'; import SidebarItem from '../../sidebar-item';

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
import Skeleton from '..'; import Skeleton from '..';
test('row-width array', () => { test('row-width array', () => {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -4,7 +4,7 @@ import {
trigger, trigger,
triggerDrag, triggerDrag,
mockGetBoundingClientRect mockGetBoundingClientRect
} from '../../../test/utils'; } from '../../../test';
function mockRect(vertical) { function mockRect(vertical) {
return mockGetBoundingClientRect({ return mockGetBoundingClientRect({

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import Stepper from '..'; import Stepper from '..';
import { mount, later } from '../../../test/utils'; import { mount, later } from '../../../test';
test('disabled stepper', () => { test('disabled stepper', () => {
const wrapper = mount(Stepper, { const wrapper = mount(Stepper, {

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
import Steps from '..'; import Steps from '..';
import Step from '../../step'; import Step from '../../step';

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,4 +1,4 @@
import { mount, mockScrollTop } from '../../../test/utils'; import { mount, mockScrollTop } from '../../../test';
import Vue from 'vue'; import Vue from 'vue';
import Sticky from '..'; import Sticky from '..';

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -1,5 +1,5 @@
import SubmitBar from '..'; import SubmitBar from '..';
import { mount } from '../../../test/utils'; import { mount } from '../../../test';
test('submit event', () => { test('submit event', () => {
const submit = jest.fn(); const submit = jest.fn();

View File

@ -1,4 +1,4 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
demoTest(Demo); snapshotDemo(Demo);

View File

@ -4,7 +4,7 @@ import {
triggerDrag, triggerDrag,
later, later,
mockGetBoundingClientRect mockGetBoundingClientRect
} from '../../../test/utils'; } from '../../../test';
const THRESHOLD = 0.15; const THRESHOLD = 0.15;
const defaultProps = { const defaultProps = {

View File

@ -1,17 +1,17 @@
import Demo from '../demo'; import Demo from '../demo';
import demoTest from '../../../test/demo-test'; import { snapshotDemo } from '../../../test/demo';
import { mockGetBoundingClientRect } from '../../../test/utils'; import { mockGetBoundingClientRect } from '../../../test';
let restore; let restore;
demoTest(Demo, { snapshotDemo(Demo, {
hookBeforeTest: () => { beforeTest: () => {
restore = mockGetBoundingClientRect({ restore = mockGetBoundingClientRect({
width: 100, width: 100,
height: 100 height: 100
}); });
}, },
hookAfterTest: () => { afterTest: () => {
restore(); restore();
} }
}); });

Some files were not shown because too many files have changed in this diff Show More