Skip to content

Commit 4fb499a

Browse files
committed
chore: code style
1 parent 064e6d4 commit 4fb499a

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

packages/runtime-vapor/__tests__/apiInject.spec.ts

+4-12
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,12 @@ describe('api: provide/inject', () => {
5959
const Provider = define({
6060
setup() {
6161
provide(key, 1)
62-
const instance = getCurrentInstance()!
63-
return createComponent(Middle, instance)
62+
return createComponent(Middle, getCurrentInstance()!)
6463
},
6564
})
6665

6766
const Middle = {
68-
render() {
69-
const instance = getCurrentInstance()!
70-
return createComponent(Consumer, instance)
71-
},
67+
render: () => createComponent(Consumer, getCurrentInstance()!),
7268
}
7369

7470
const Consumer = {
@@ -90,16 +86,12 @@ describe('api: provide/inject', () => {
9086
const Provider = define({
9187
setup() {
9288
provide('foo', 'foo')
93-
const instance = getCurrentInstance()!
94-
return createComponent(Middle, instance)
89+
return createComponent(Middle, getCurrentInstance()!)
9590
},
9691
})
9792

9893
const Middle = {
99-
render() {
100-
const instance = getCurrentInstance()!
101-
return createComponent(Consumer, instance)
102-
},
94+
render: () => createComponent(Consumer, getCurrentInstance()!),
10395
}
10496

10597
const Consumer = {

0 commit comments

Comments
 (0)