Skip to content

Commit 3e616e9

Browse files
committed
JS: Add test
1 parent 84d2107 commit 3e616e9

File tree

8 files changed

+57
-0
lines changed

8 files changed

+57
-0
lines changed

javascript/ql/test/library-tests/frameworks/Vue/Instance.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
| single-component-file-1.vue:0:0:0:0 | single-component-file-1.vue |
22
| single-file-component-2.vue:0:0:0:0 | single-file-component-2.vue |
33
| single-file-component-3.vue:0:0:0:0 | single-file-component-3.vue |
4+
| single-file-component-4.vue:0:0:0:0 | single-file-component-4.vue |
5+
| single-file-component-5.vue:0:0:0:0 | single-file-component-5.vue |
46
| tst.js:3:1:10:2 | new Vue ... 2\\n\\t}\\n}) |
57
| tst.js:12:1:16:2 | new Vue ... \\t}),\\n}) |
68
| tst.js:18:1:27:2 | Vue.com ... }\\n\\t}\\n}) |

javascript/ql/test/library-tests/frameworks/Vue/Instance_getAPropertyValue.expected

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
| single-component-file-1.vue:0:0:0:0 | single-component-file-1.vue | dataA | single-component-file-1.vue:6:40:6:41 | 42 |
22
| single-file-component-3.vue:0:0:0:0 | single-file-component-3.vue | dataA | single-file-component-3-script.js:4:37:4:38 | 42 |
3+
| single-file-component-4.vue:0:0:0:0 | single-file-component-4.vue | dataA | single-file-component-4.vue:15:14:15:15 | 42 |
4+
| single-file-component-4.vue:0:0:0:0 | single-file-component-4.vue | message | single-file-component-4.vue:12:23:12:30 | 'Hello!' |
5+
| single-file-component-5.vue:0:0:0:0 | single-file-component-5.vue | dataA | single-file-component-5.vue:13:14:13:15 | 42 |
6+
| single-file-component-5.vue:0:0:0:0 | single-file-component-5.vue | message | single-file-component-5.vue:10:23:10:30 | 'Hello!' |
37
| tst.js:3:1:10:2 | new Vue ... 2\\n\\t}\\n}) | dataA | tst.js:8:10:8:11 | 42 |
48
| tst.js:12:1:16:2 | new Vue ... \\t}),\\n}) | dataA | tst.js:14:10:14:11 | 42 |
59
| tst.js:18:1:27:2 | Vue.com ... }\\n\\t}\\n}) | dataA | tst.js:20:10:20:11 | 42 |

javascript/ql/test/library-tests/frameworks/Vue/Instance_getOption.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
| single-component-file-1.vue:0:0:0:0 | single-component-file-1.vue | data | single-component-file-1.vue:6:11:6:45 | functio ... 42 } } |
22
| single-file-component-3.vue:0:0:0:0 | single-file-component-3.vue | data | single-file-component-3-script.js:4:8:4:42 | functio ... 42 } } |
3+
| single-file-component-4.vue:0:0:0:0 | single-file-component-4.vue | render | single-file-component-4.vue:9:13:9:22 | (h) => { } |
34
| tst.js:3:1:10:2 | new Vue ... 2\\n\\t}\\n}) | data | tst.js:7:8:9:2 | {\\n\\t\\tdataA: 42\\n\\t} |
45
| tst.js:3:1:10:2 | new Vue ... 2\\n\\t}\\n}) | render | tst.js:4:10:6:2 | functio ... c);\\n\\t} |
56
| tst.js:12:1:16:2 | new Vue ... \\t}),\\n}) | data | tst.js:13:8:15:3 | () => ( ... 42\\n\\t}) |

javascript/ql/test/library-tests/frameworks/Vue/TemplateElement.expected

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@
1010
| single-file-component-3.vue:2:5:7:8 | <p>...</> |
1111
| single-file-component-3.vue:4:1:5:9 | <script>...</> |
1212
| single-file-component-3.vue:6:1:7:8 | <style>...</> |
13+
| single-file-component-4.vue:1:1:3:11 | <template>...</> |
14+
| single-file-component-4.vue:2:5:20:9 | <p>...</> |
15+
| single-file-component-4.vue:4:1:18:9 | <script>...</> |
16+
| single-file-component-4.vue:19:1:20:8 | <style>...</> |
17+
| single-file-component-5.vue:1:1:3:11 | <template>...</> |
18+
| single-file-component-5.vue:2:5:18:9 | <p>...</> |
19+
| single-file-component-5.vue:4:1:16:9 | <script>...</> |
20+
| single-file-component-5.vue:17:1:18:8 | <style>...</> |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
| single-component-file-1.vue:6:40:6:41 | 42 | single-component-file-1.vue:6:40:6:41 | 42 | single-component-file-1.vue:2:8:2:21 | v-html=dataA |
22
| single-file-component-3-script.js:4:37:4:38 | 42 | single-file-component-3-script.js:4:37:4:38 | 42 | single-file-component-3.vue:2:8:2:21 | v-html=dataA |
3+
| single-file-component-4.vue:15:14:15:15 | 42 | single-file-component-4.vue:15:14:15:15 | 42 | single-file-component-4.vue:2:8:2:21 | v-html=dataA |
4+
| single-file-component-5.vue:13:14:13:15 | 42 | single-file-component-5.vue:13:14:13:15 | 42 | single-file-component-5.vue:2:8:2:21 | v-html=dataA |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
| single-component-file-1.vue:2:8:2:21 | v-html=dataA |
22
| single-file-component-2.vue:2:8:2:21 | v-html=dataA |
33
| single-file-component-3.vue:2:8:2:21 | v-html=dataA |
4+
| single-file-component-4.vue:2:8:2:21 | v-html=dataA |
5+
| single-file-component-5.vue:2:8:2:21 | v-html=dataA |
46
| tst.js:5:13:5:13 | a |
57
| tst.js:38:12:38:17 | danger |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<p v-html="dataA"/>
3+
</template>
4+
<script>
5+
import Vue from 'vue'
6+
import Component from 'vue-class-component'
7+
8+
@Component({
9+
render: (h) => { }
10+
})
11+
export default class MyComponent extends Vue {
12+
message: string = 'Hello!'
13+
14+
get dataA() {
15+
return 42;
16+
}
17+
}
18+
</script>
19+
<style>
20+
</style>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<template>
2+
<p v-html="dataA"/>
3+
</template>
4+
<script>
5+
import Vue from 'vue'
6+
import Component from 'vue-class-component'
7+
8+
@Component
9+
export default class MyComponent extends Vue {
10+
message: string = 'Hello!'
11+
12+
get dataA() {
13+
return 42;
14+
}
15+
}
16+
</script>
17+
<style>
18+
</style>

0 commit comments

Comments
 (0)