Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Syntax-errors in tests fails to compile, but are not picked up by watch #152

Open
@GeeWee

Description

@GeeWee

Is this a bug report?

Bug report

Can you also reproduce the problem with npm 4.x?

I'm running npm 5.3
Same bug on yarn 0.27.5

Environment

  1. npm ls react-scripts-ts (if you haven’t ejected): 2.6.0
  2. node -v: 8.4 currently, issue is also on 7.x branch
  3. npm -v: 5.3
  4. yarn --version (if you use Yarn): 0.27.5

Then, specify:

  1. Operating system: Windows 10 for me. Problem also occurs on OSX Sierra.

Bug report

If you run yarn/npm start with a syntax error in your tests, it crashes and reports a tsc error. However if you then fix the syntax error, an incremental recompilation is not triggered.

I'd expect it to either not error on the tests at all, or also pick up the changes when the tests are changed.

I think perhaps this might have something to do with webpack building a dependency graph, and only compiling files that are referenced by the entry point.

Support for this thesis: The test files are not picked up for recompilation. However if i export something from the test file, and then import it into e.g. app.tsx, the test files are picked up for incremental recompilation, and it's possible to fix the syntax error and continue developing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions