Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Mocha lets us specify what the test output looks like, and even what environment it will run in! In this video, we set up our test suite to display in our browser, and see some different reporting styles.
- A good use of the
--reporterflag is when you only want to see test failures
- To show only the failing test errors, you can use
mocha --reporter min
mocha --reporter markdownwill print the same test report we’re used to, but using markdown formatting
- You can add a
--reporterflag to your
package.json-- file in your “test” command -- so that
npm testwill always use that reporter
You need to sign up for Treehouse in order to download course files.Sign up