Skip to content

Commit 8b10312

Browse files
wangsongcygj6
authored andcommitted
test: fix global-api tests
1 parent 49af33f commit 8b10312

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createApp } from 'vue';
22
import App from './App.vue';
33

4-
createApp(App).mount('#app');
4+
const app = createApp(App);
5+
app.mount('#app');
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { createApp, h } from 'vue';
22
import App from './App.vue';
33

4-
createApp({
4+
const app = createApp({
55
myOption: 'hello!',
66
render: () => h(App),
7-
}).mount('#app');
7+
});
8+
9+
app.mount('#app');

Diff for: generator/codemods/global-api/__testfixtures__/vue-router.output.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ import { createApp } from 'vue';
22
import App from './App.vue';
33
import router from './router';
44

5-
createApp(App).use(router).mount('#app');
5+
const app = createApp(App).use(router);
6+
app.mount('#app');

Diff for: generator/codemods/global-api/__testfixtures__/vuex.output.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import App from './App.vue';
33
import store from './store';
44
import anotherStore from './another-store';
55

6-
createApp(App).use(store).mount('#app');
7-
8-
createApp(App).use(anotherStore).mount('#app');
6+
const app = createApp({}).use(h => h(App));
7+
app.mount('#app');
8+
const app = createApp({}).use(h => h(App));
9+
app.mount('#app');

0 commit comments

Comments
 (0)