N
Nuxt7mo ago
nilesmack

Mocking API Endpoint - Testing

Here in the docs (https://nuxt.com/docs/getting-started/testing#registerendpoint), it discusses how to register an endpoint while doing tests. One of my components calls out to an External API though. The docs say:
Note: If your requests in a component go to external API, you can use baseURL and then make it empty using Nuxt Environment Config ($test) so all your requests will go to Nitro server.
Note: If your requests in a component go to external API, you can use baseURL and then make it empty using Nuxt Environment Config ($test) so all your requests will go to Nitro server.
...I don't understand what it's trying to say by "making it empty using the Nuxt Environment Config $test". Could anyone clarify what this section is trying to say.
Nuxt
Testing · Get Started with Nuxt
How to test your Nuxt application.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server