+
Skip to content

File changes are not picked up by vitest watch #1598

@gremlin896

Description

@gremlin896

Please provide the environment you discovered this bug in.

Reproduction repo here: https://github.com/gremlin896/vitest-angular-repro

Node           : 20.18.0
OS             : darwin-arm64
Native Target  : aarch64-macos
yarn           : 4.3.0

Steps to reproduce:

  • run yarn vitest watch
  • make a change to app.component.spec.ts (e.g. uncomment line 16 that should cause a test failure)
  • tests are rerun but against the original code (e.g. test still passes)

Which area/package is the issue in?

vitest-angular

Description

When running vitest watch, changes to test files will retrigger a test run, but the tests will run against the original code. Re-running vitest fresh will run against the updated code as expected.

Please provide the exception or error you saw


Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载