Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registerEndpoint fails to register on deep paths #956

Open
marr opened this issue Sep 27, 2024 · 0 comments
Open

registerEndpoint fails to register on deep paths #956

marr opened this issue Sep 27, 2024 · 0 comments

Comments

@marr
Copy link

marr commented Sep 27, 2024

Environment

  • Operating System: Linux
  • Node Version: v18.20.3
  • Nuxt Version: 3.13.2
  • CLI Version: 3.13.2
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: compatibilityDate, devtools
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/nuxt-starter-fvrlkg?file=tests/app.test.ts,app.vue

cancel the running process in the terminal and run npm test - you will see the failure.

Describe the bug

It seems that when registerEndpoint is called on a path containing two levels deep such as /api/foo, then subsequent calls to registerEndpoint on paths containing that root will fail to register. Ie, registerEndpoint('/api/foo/bar', ...) will silently fail. Calls to that deeper path when run in the test context receive the shorter path's response.

Additional context

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant