Skip to content

@nuxt/test-utils -- setup() clobbers console.log() functionality #350

Description

@dhait

Environment

  • Operating System: Darwin
  • Node Version: v18.16.0
  • Nuxt Version: 3.5.2
  • Nitro Version: 2.4.1
  • Package Manager: yarn@1.22.17
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-kp3tnj?file=test%2Fmyhello.test.ts

Describe the bug

When setup() is called at the beginning of a vitest test file (as described in the docs https://nuxt.com/docs/getting-started/testing), console.log() no longer displays text on the console during the test run.

When setup() is commented out, console.log() works as expected.

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions