Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd97e07e

Browse files
committed
test: add testcase
1 parent1b87065 commitd97e07e

File tree

8 files changed

+53
-0
lines changed

8 files changed

+53
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
importVuefrom'vue';
2+
3+
Vue.nextTick(()=>{
4+
console.log('foo');
5+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import{nextTick}from'vue';
2+
3+
nextTick(()=>{
4+
console.log('foo');
5+
})

‎generator/codemods/global-api/__tests__/global-api-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ defineTest(__dirname, 'index', null, 'custom-root-prop')
88
defineTest(__dirname,'index',null,'vue-router')
99
defineTest(__dirname,'index',null,'vuex')
1010
defineTest(__dirname,'index',null,'vue-use')
11+
defineTest(__dirname,'index',null,'next-tick')
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
exportdefault{
2+
props:['text'],
3+
methods:{
4+
input:function(){
5+
this.$emit('increment');
6+
this.$emit('decrement');
7+
}
8+
}
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
exportdefault{
2+
emits:["increment","decrement"],
3+
props:['text'],
4+
5+
methods:{
6+
input:function(){
7+
this.$emit('increment');
8+
this.$emit('decrement');
9+
}
10+
}
11+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
exportdefault{
2+
destroyed:function(){
3+
console.log('foo')
4+
},
5+
beforeDestroy:function(){
6+
console.log('bar')
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
exportdefault{
2+
unmounted:function(){
3+
console.log('foo')
4+
},
5+
beforeUnmount:function(){
6+
console.log('bar')
7+
}
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
jest.autoMockOff()
2+
3+
const{ defineTest}=require('jscodeshift/dist/testUtils')
4+
5+
defineTest(__dirname,'index',null,'add-emit-declaration')
6+
defineTest(__dirname,'index',null,'rename-lifecycle')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp