Did you try it to see what would happen?
JS Node won’t allow you to run the test function while it’s ‘Listening on port 4001’ in start mode.
Therefore, we need to stop it and then it will allow us to run ‘npm test’.
I don’t have a very scientific explanation for this, but computers are dumb: they can’t always multi-task and they need to be told to stop a task to begin another task on some occasions. At least, this seems to be the case with Node.
I cannot get the console to stop running test ( I am stuck at point number 2). I am on a mac so ctrl + C is not working. I’ve read this can be replaced by command + . (dot), but this i not working either. How do you stop the terminal from running tests on mac?
This is an old post, but I’ll answer this question since I had the same problem: ctrl-C did not close the bash window on my Mac. I fixed the problem by clicking on the X to close bash, and then I clicked on the + to restart bash. This resolved the issue and allowed me to advance.