Closed virzen closed 7 years ago
I would prefer to not make breaking changes to people's workflow if it can be avoided. So I'd suggest just using the env variable CI
for this purpose (docs). If this feels semantically wrong, maybe just add process.env.GIT_HOOK
to the if
statement that would get removed here? I'd accept that PR.
For now, I'm closing this one.
create-react-app
adds--watch
options toyarn test
script automatically, unless running in CI env or--coverage
option being present. This is cool, until one wants to use it as git hook. It may be done, using options above, but setting env to CI is a hack and--coverage
obfuscates results with long table of files. I propose to disable this behaviour, which is exactly what this PR is doing.The only downside of this change is necessity to add
test:watch
script (which I would add myself, if only I knew how to do it).