Differentiate between test and test:watch.
Closed this issue · 0 comments
randycoulman commented
The stock react-scripts project only defines a test
script that runs jest with --watch
by default. That means that we can't run yarn validate
without watch mode starting up.
I can think of at least two options:
-
Define a new script in our fork to run tests in non-watch mode.
-
Looking at the
test
script, it will not add the--watch
flag if eitherCI
is set in the env, or if we run the test script with the--coverage
argument. So, we could define atest
command that ranreact-scripts test --coverage
and atest:watch
command that ranreact-scripts test
.