Running the test suite for the message utility

Over in the Terminal, if I run npm test, all we're going to see is that we have zero tests in place:

Here we have the server-test file globbing pattern; it could not resolve any files. We can fix this issue by simply adding a test file. I'm going to add a test file for the message utility, message.test.js. Now we can go ahead and rerun the npm test command. This time around it does indeed find a file and we see we have zero passing tests, which is a great starting point:

Inside message.test.js ...

Get Advanced Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.