Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 886440d

Browse files
committed
test(runtime-vapor): tidy custom directives test
1 parent 30f6eec commit 886440d

File tree

10 files changed

+17
-853
lines changed

10 files changed

+17
-853
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ describe('api: createVaporApp', () => {
152152
expect(host.innerHTML).toBe(`foobar!barbaz!`)
153153
})
154154

155-
test.todo('directive', () => {
155+
test('directive', () => {
156156
const spy1 = vi.fn()
157157
const spy2 = vi.fn()
158158

@@ -167,12 +167,12 @@ describe('api: createVaporApp', () => {
167167
},
168168
}).create()
169169

170-
const FooBar = { mounted: spy1 }
170+
const FooBar = spy1
171171
app.directive('FooBar', FooBar)
172172
expect(app.directive('FooBar')).toBe(FooBar)
173173

174-
app.directive('BarBaz', { mounted: spy2 })
175-
app.directive('BarBaz', { mounted: spy2 })
174+
app.directive('BarBaz', spy2)
175+
app.directive('BarBaz', spy2)
176176
expect(
177177
'Directive "BarBaz" has already been registered in target app.',
178178
).toHaveBeenWarnedTimes(1)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe('api: setup context', () => {
104104
const Wrapper = defineComponent({
105105
setup(_) {
106106
const n0 = createSlot('default')
107-
setInheritAttrs(false, true)
107+
setInheritAttrs(true)
108108
return n0
109109
},
110110
})

0 commit comments

Comments
 (0)