And a nitropack release including this change to be updated in nuxt
These have been merged and released
Primary motivation for adding runtime support is to actually to merge more test files π. Most if not all code for detectBrowserLanguage is used at runtime, so there is no need to rebuild the project to test each options.
This PR changes the @nuxt/test-utils code further, startServer now optionally accepts additional environment variables. And I added helper functions to make setting runtime config variables via environment variables easier.
π Linked issue
β Type of change
π Description
Requires https://github.com/unjs/nitro/pull/1831 to be mergedAnd anitropack
release including this change to be updated innuxt
These have been merged and released
Primary motivation for adding runtime support is to actually to merge more test files π. Most if not all code for
detectBrowserLanguage
is used at runtime, so there is no need to rebuild the project to test each options.https://github.com/unjs/nitro/pull/1831 allows us to override runtime configs objects with environment variables, as this is currently not possible.
This PR changes the
@nuxt/test-utils
code further,startServer
now optionally accepts additional environment variables. And I added helper functions to make setting runtime config variables via environment variables easier.Using the following in a test
Will be converted into
NUXT_PUBLIC_I18N_DETECT_BROWSER_LANGUAGE=false
and restarts the server with all properties in the passed object.π Checklist