Skip to content

type changes not updated during watch mode #943

@unional

Description

@unional

Issue

When you make changes to the types, e.g. renaming a type, the changes cause the test to fail, even if the change actually works fine.

Need to quit jest watch and start again for the changes to be picked up correctly.

causes

My guess is that during rename, multiple files are affected and ts-jest only detect one file has been changed, so the cache of other files are not invalidated, thus containing outdated information.

This happens whenever I make changes to multiple files and save them at the same time.

Another example would be moving a type from one file to another.

Minimal repo

I encounter this in multiple situations. For example, https://github.com/unional/progress-str

To reproduce the issue, you need to run the test in watch mode (npm run watch in the repo above),
and then make some changes such as rename or move types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions