WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

nuxt/test-utils not working with vitest@4 browser mode #1473

@OrbisK

Description

@OrbisK

Environment

  • Operating System: Linux
  • Node Version: v23.5.0
  • Nuxt Version: 4.1.3
  • CLI Version: 3.29.0
  • Nitro Version: 2.12.6
  • Package Manager: [email protected]
  • Builder: -
  • User Config: devtools, app, compatibilityDate
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/OrbisK/test-utils-fork/tree/reproduction/vitest-v4

Describe the bug

all tests are failing with `Cannot read properties of undefined (reading 'idToModuleMap')

Additional context

  1. pnpm i
  2. pnpm dev:prepare
  3. cd examples/app-vitest-browser
  4. pnpm test

Logs

Error: Failed to import test file *****/test-utils/src/runtime/entry.ts
Caused by: TypeError: Cannot read properties of undefined (reading 'idToModuleMap')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions