-
-
Notifications
You must be signed in to change notification settings - Fork 102
/
v-memo.test.ts.snap
64 lines (56 loc) · 1.71 KB
/
v-memo.test.ts.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`jsx-vue-directive > v-memo > ./fixtures/v-memo/v-memo.tsx 1`] = `
"
import { withMemo as __MACROS_withMemo } from \\"vue\\";const __MACROS_cache = [];__MACROS_cache[0] = [];// @ts-nocheck
const list = [1, 2, 3]
let selected = $ref(0)
export default () => (
<>
{Array.from(list).map((i, index) => __MACROS_withMemo([selected === i], () => <div key={index}>
<div>
{i}: {selected}
</div>
</div>, __MACROS_cache[0], 0 + index + 1))}
</>
)
"
`;
exports[`jsx-vue-directive > v-memo > ./fixtures/v-memo/v-memo.vue 1`] = `
"<script setup lang=\\"tsx\\">
import { withMemo as __MACROS_withMemo } from \\"vue\\";const __MACROS_cache = [];__MACROS_cache[0] = [];
const list = [1, 2, 3]
let selected = $ref(0)
defineRender(() => (
<>
{Array.from(list).map((i, __MACROS_index) => __MACROS_withMemo([selected === i], () => <div key={i}>
<div>
{i}: {selected}
</div>
</div>, __MACROS_cache[0], 0 + __MACROS_index + 1))}
</>
))
</script>
"
`;
exports[`jsx-vue-directive > v-memo > ./fixtures/v-memo/v-once.tsx 1`] = `
"
import { withMemo as __MACROS_withMemo } from \\"vue\\";const __MACROS_cache = [];let selected = $ref(0)
export default () => (
__MACROS_withMemo([], () => <div onClick={() => selected++}>
{selected}
</div>, __MACROS_cache, 0)
)
"
`;
exports[`jsx-vue-directive > v-memo > ./fixtures/v-memo/v-once.vue 1`] = `
"<script setup lang=\\"tsx\\">
import { withMemo as __MACROS_withMemo } from \\"vue\\";const __MACROS_cache = [];
let selected = $ref(0)
defineRender(() => (
__MACROS_withMemo([], () => <div onClick={() => selected++}>
{selected}
</div>, __MACROS_cache, 0)
))
</script>
"
`;