nilesmack
nilesmack
NNuxt
Created by nilesmack on 5/13/2024 in #❓・help
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.
1 replies