You can use the –watchAll=false parameter.
So for example you can create another script like this:
"scripts": {
"test:nowatch": "react-scripts test --watchAll=false",
}
And then run
"pre-commit": [
"precommit-msg",
"lint",
"test:nowatch"
],