mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
test: adjust mount import source
This commit is contained in:
parent
56fc7f7712
commit
a7df6cfebb
@ -1,5 +1,5 @@
|
|||||||
import ActionBar from '..';
|
import ActionBar from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('should allow to disable safe-area-inset-bottom prop', () => {
|
test('should allow to disable safe-area-inset-bottom prop', () => {
|
||||||
const wrapper = mount(ActionBar, {
|
const wrapper = mount(ActionBar, {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
import AddressList from '..';
|
import AddressList from '..';
|
||||||
|
|
||||||
const list = [
|
const list = [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Badge from '..';
|
import Badge from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('should not render when badge is empty string', () => {
|
test('should not render when badge is empty string', () => {
|
||||||
const wrapper = mount(Badge, {
|
const wrapper = mount(Badge, {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Card from '..';
|
import Card from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('click event', () => {
|
test('click event', () => {
|
||||||
const onClick = jest.fn();
|
const onClick = jest.fn();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Cell from '..';
|
import Cell from '..';
|
||||||
import CellGroup from '../../cell-group';
|
import CellGroup from '../../cell-group';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('click event', () => {
|
test('click event', () => {
|
||||||
const click = jest.fn();
|
const click = jest.fn();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Col from '..';
|
import Col from '..';
|
||||||
import Row from '../../row';
|
import Row from '../../row';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('Col click event', () => {
|
test('Col click event', () => {
|
||||||
const wrapper = mount(Col);
|
const wrapper = mount(Col);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import ContactCard from '..';
|
import ContactCard from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('should emit click event after clicking the ContactCard', () => {
|
test('should emit click event after clicking the ContactCard', () => {
|
||||||
const click = jest.fn();
|
const click = jest.fn();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import ContactList from '..';
|
import ContactList from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
const contactInfo = {
|
const contactInfo = {
|
||||||
name: 'test',
|
name: 'test',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import DatetimePicker from '..';
|
import DatetimePicker from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('confirm & cancel event', () => {
|
test('confirm & cancel event', () => {
|
||||||
const onConfirm = jest.fn();
|
const onConfirm = jest.fn();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Empty from '..';
|
import Empty from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('image slot', () => {
|
test('image slot', () => {
|
||||||
const wrapper = mount(Empty, {
|
const wrapper = mount(Empty, {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('click grid item', () => {
|
test('click grid item', () => {
|
||||||
const onClick = jest.fn();
|
const onClick = jest.fn();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Icon from '..';
|
import Icon from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('render icon with builtin icon name', () => {
|
test('render icon with builtin icon name', () => {
|
||||||
const wrapper = mount(Icon, {
|
const wrapper = mount(Icon, {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
import VanImage from '..';
|
import VanImage from '..';
|
||||||
|
|
||||||
test('click event', () => {
|
test('click event', () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
import Loading from '..';
|
import Loading from '..';
|
||||||
|
|
||||||
test('size prop', () => {
|
test('size prop', () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
import Overlay from '..';
|
import Overlay from '..';
|
||||||
|
|
||||||
test('z-index prop', () => {
|
test('z-index prop', () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
import Paginaion from '..';
|
import Paginaion from '..';
|
||||||
|
|
||||||
test('render prev-text & next-text slot', () => {
|
test('render prev-text & next-text slot', () => {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import PasswordInput from '..';
|
import PasswordInput from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('focus event', () => {
|
test('focus event', () => {
|
||||||
const focus = jest.fn();
|
const focus = jest.fn();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('radio-group change', () => {
|
test('radio-group change', () => {
|
||||||
const wrapper = mount({
|
const wrapper = mount({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Search from '..';
|
import Search from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('input event', () => {
|
test('input event', () => {
|
||||||
const onInput = jest.fn();
|
const onInput = jest.fn();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
import Sidebar from '..';
|
import Sidebar from '..';
|
||||||
|
|
||||||
test('click event & change event', () => {
|
test('click event & change event', () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
import Skeleton from '..';
|
import Skeleton from '..';
|
||||||
|
|
||||||
test('row-width array', () => {
|
test('row-width array', () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('icon slot', () => {
|
test('icon slot', () => {
|
||||||
const wrapper = mount({
|
const wrapper = mount({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import SubmitBar from '..';
|
import SubmitBar from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('submit event', () => {
|
test('submit event', () => {
|
||||||
const submit = jest.fn();
|
const submit = jest.fn();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Switch from '..';
|
import Switch from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('emit event', () => {
|
test('emit event', () => {
|
||||||
const input = jest.fn();
|
const input = jest.fn();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Tag from '..';
|
import Tag from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('click event', () => {
|
test('click event', () => {
|
||||||
const click = jest.fn();
|
const click = jest.fn();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import TreeSelect from '..';
|
import TreeSelect from '..';
|
||||||
import { mount } from '../../../test';
|
import { mount } from '@vue/test-utils';
|
||||||
|
|
||||||
test('empty list', () => {
|
test('empty list', () => {
|
||||||
expect(mount(TreeSelect)).toMatchSnapshot();
|
expect(mount(TreeSelect)).toMatchSnapshot();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user