|
1 | 1 | import { mount } from '@vue/test-utils';
|
2 | 2 | import { describe, expect, it } from 'vitest';
|
3 | 3 | import { createRouter, createWebHistory } from '@ionic/vue-router';
|
4 |
| -import { IonicVue, IonApp, IonRouterOutlet, IonPage, useIonRouter, createAnimation } from '@ionic/vue'; |
| 4 | +import { IonicVue, IonRouterOutlet, IonPage, useIonRouter } from '@ionic/vue'; |
5 | 5 | import { mockAnimation, waitForRouter } from './utils';
|
6 | 6 |
|
7 |
| -const App = { |
8 |
| - components: { IonApp, IonRouterOutlet }, |
9 |
| - template: '<ion-app><ion-router-outlet /></ion-app>', |
10 |
| -} |
11 |
| - |
12 | 7 | const BasePage = {
|
13 | 8 | template: '<ion-page></ion-page>',
|
14 | 9 | components: { IonPage },
|
@@ -40,7 +35,7 @@ describe('useIonRouter', () => {
|
40 | 35 |
|
41 | 36 | router.push('/');
|
42 | 37 | await router.isReady();
|
43 |
| - const wrapper = mount(App, { |
| 38 | + const wrapper = mount(IonRouterOutlet, { |
44 | 39 | global: {
|
45 | 40 | plugins: [router, IonicVue]
|
46 | 41 | }
|
@@ -85,7 +80,7 @@ describe('useIonRouter', () => {
|
85 | 80 |
|
86 | 81 | router.push('/');
|
87 | 82 | await router.isReady();
|
88 |
| - const wrapper = mount(App, { |
| 83 | + const wrapper = mount(IonRouterOutlet, { |
89 | 84 | global: {
|
90 | 85 | plugins: [router, IonicVue]
|
91 | 86 | }
|
@@ -137,7 +132,7 @@ describe('useIonRouter', () => {
|
137 | 132 |
|
138 | 133 | router.push('/');
|
139 | 134 | await router.isReady();
|
140 |
| - const wrapper = mount(App, { |
| 135 | + const wrapper = mount(IonRouterOutlet, { |
141 | 136 | global: {
|
142 | 137 | plugins: [router, IonicVue]
|
143 | 138 | }
|
@@ -181,7 +176,7 @@ describe('useIonRouter', () => {
|
181 | 176 |
|
182 | 177 | router.push('/');
|
183 | 178 | await router.isReady();
|
184 |
| - const wrapper = mount(App, { |
| 179 | + const wrapper = mount(IonRouterOutlet, { |
185 | 180 | global: {
|
186 | 181 | plugins: [router, IonicVue]
|
187 | 182 | }
|
@@ -229,7 +224,7 @@ describe('useIonRouter', () => {
|
229 | 224 |
|
230 | 225 | router.push('/');
|
231 | 226 | await router.isReady();
|
232 |
| - const wrapper = mount(App, { |
| 227 | + const wrapper = mount(IonRouterOutlet, { |
233 | 228 | global: {
|
234 | 229 | plugins: [router, IonicVue]
|
235 | 230 | }
|
|
0 commit comments