MCPcopy
hub / github.com/vuejs/core / assertHookCalls

Function assertHookCalls

packages/runtime-core/__tests__/components/KeepAlive.spec.ts:84–92  ·  view source on GitHub ↗
(component: any, callCounts: number[])

Source from the content-addressed store, hash-verified

82 })
83
84 function assertHookCalls(component: any, callCounts: number[]) {
85 expect([
86 component.created.mock.calls.length,
87 component.mounted.mock.calls.length,
88 component.activated.mock.calls.length,
89 component.deactivated.mock.calls.length,
90 component.unmounted.mock.calls.length,
91 ]).toEqual(callCounts)
92 }
93
94 test('should preserve state', async () => {
95 const viewRef = ref('one')

Callers 4

KeepAlive.spec.tsFile · 0.85
assertNameMatchFunction · 0.85
assertNameMatchWithFlagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected