MCPcopy
hub / github.com/nuxt/nuxt / test

Function test

test/fixtures/basic/server/api/useAsyncData/count.ts:3–6  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1let counter = 0
2
3const test = () => () => {
4 // TODO: useNuxtApp should be undefined when type-testing a nitro route
5 useNuxtApp()
6}
7test()
8
9export default defineEventHandler(() => ({ count: counter++ }))

Calls 1

useNuxtAppFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…