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

Function useTestDirective

packages/server-renderer/__tests__/ssrDirectives.spec.ts:587–596  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

585 test('custom directive w/ getSSRProps (expose)', async () => {
586 let exposeVars: null | string | undefined = null
587 const useTestDirective = () => ({
588 vTest: {
589 getSSRProps({ instance }: any) {
590 if (instance) {
591 exposeVars = instance.x
592 }
593 return { id: exposeVars }
594 },
595 },
596 })
597 const { vTest } = useTestDirective()
598
599 const renderString = await renderToString(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected