Skip to content

Conversation

yamachi4416
Copy link

@yamachi4416 yamachi4416 commented Sep 14, 2025

πŸ”— Linked issue

#1261
It might work if you specify fetch in the adapter.

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

I tried to make registerEndpoint support mocking native fetch.

Copy link

pkg-pr-new bot commented Sep 14, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/test-utils@1415

commit: 6fd1b45

@yamachi4416 yamachi4416 force-pushed the native-fetch-endpoint-mock branch 2 times, most recently from 06b41d4 to 5225e00 Compare September 14, 2025 00:57
@yamachi4416
Copy link
Author

The tests pass with happy-dom, but with jsdom the tests fail because Request is not supported. How should I handle this...

@yamachi4416 yamachi4416 force-pushed the native-fetch-endpoint-mock branch from 5225e00 to a4f0c91 Compare September 14, 2025 03:01
@yamachi4416 yamachi4416 force-pushed the native-fetch-endpoint-mock branch from a4f0c91 to 6fd1b45 Compare September 17, 2025 23:25
@yamachi4416 yamachi4416 changed the title fix(runtime): allow registerEndpoint to work with native fetch feat(runtime): allow registerEndpoint to work with native fetch Sep 17, 2025
@yamachi4416
Copy link
Author

Thank you for letting me use this all the time. I think it’s now ready for your review. Sorry if my first pull request is a bit clumsy. I’d appreciate it if you could review it.

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

Successfully merging this pull request may close these issues.

1 participant