Skip to content

[nuxt] instance is not available in server utils unit tests with useRuntimeConfig() #949

Open
@alexcroox

Description

@alexcroox

Environment

Reproduction

https://stackblitz.com/edit/github-gu1sj1-si6cpn?file=server%2Futils%2Fexample-util.nuxt.spec.ts&startScript=start

Run -> npm run test

Describe the bug

After some recent dependancy upgrades around Nuxt I'm getting the [nuxt] instance unavailable error on tests that call functions in server/utils that use useRuntimeConfig.

See the reproduction link for an example. Thanks.

Additional context

No response

Logs

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions