Skip to content

Commit cf642a7

Browse files
committed
feat(runtime-vapor): KeepAlive (wip)
1 parent 20b6594 commit cf642a7

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
describe.todo('KeepAlive', () => {
2+
test.todo('should preserve state', async () => {})
3+
4+
test.todo('should call correct lifecycle hooks', async () => {})
5+
6+
test.todo(
7+
'should call correct lifecycle hooks when toggle the KeepAlive first',
8+
async () => {},
9+
)
10+
11+
test.todo('should call lifecycle hooks on nested components', async () => {})
12+
13+
test.todo(
14+
'should call lifecycle hooks on nested components when root component no hooks',
15+
async () => {},
16+
)
17+
18+
test.todo('should call correct hooks for nested keep-alive', async () => {})
19+
20+
describe.todo('props', () => {
21+
test.todo('include (string)', async () => {})
22+
23+
test.todo('include (regex)', async () => {})
24+
25+
test.todo('include (array)', async () => {})
26+
27+
test.todo('exclude (string)', async () => {})
28+
29+
test.todo('exclude (regex)', async () => {})
30+
31+
test.todo('exclude (array)', async () => {})
32+
33+
test.todo('include + exclude', async () => {})
34+
35+
test.todo('max', async () => {})
36+
})
37+
38+
describe.todo('cache invalidation', () => {
39+
test('on include change', async () => {
40+
test.todo('on exclude change', async () => {})
41+
42+
test.todo('on include change + view switch', async () => {})
43+
44+
test.todo('on exclude change + view switch', async () => {})
45+
46+
test.todo('should not prune current active instance', async () => {})
47+
48+
// vuejs/vue #6938
49+
test.todo(
50+
'should not cache anonymous component when include is specified',
51+
async () => {},
52+
)
53+
54+
test.todo(
55+
'should cache anonymous components if include is not specified',
56+
async () => {},
57+
)
58+
59+
// vuejs/vue #7105
60+
test.todo(
61+
'should not destroy active instance when pruning cache',
62+
async () => {},
63+
)
64+
65+
test.todo(
66+
'should update re-activated component if props have changed',
67+
async () => {},
68+
)
69+
})
70+
})
71+
72+
it.todo('should call correct vnode hooks', async () => {})
73+
74+
// vuejs/core #1511
75+
test.todo(
76+
'should work with cloned root due to scopeId / fallthrough attrs',
77+
async () => {},
78+
)
79+
80+
test.todo('should work with async component', async () => {})
81+
82+
// vuejs/core #4976
83+
test.todo('handle error in async onActivated', async () => {})
84+
85+
// vuejs/core #3648
86+
test.todo('should avoid unmount later included components', async () => {})
87+
})

packages/runtime-vapor/src/components/KeepAlive.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)