Kent spends some time demonstrating how to install and configure the NYC Node module to run test coverage reports in the library. After establishing the reports, Kent adds lcov reports which are browser-based and more descriptive. The code for this example is on the FEM/05.2-coverage branch.
(Asian inspired music)…- And we're going to use a tool called NYC.…So this one, there's not really an exercise…associated with it.…It's just configuring a tool.…So you can follow along with this one…or just observe.…So here, we're going to add a dependency…right after mocha called NYC.…So normally you just install this using npm,…but it's already installed for you.…So we have the last version, 7.1.0.…
And to use it, it's actually quite simple.…We'll just add it right here in our test command, NYC.…And that's pretty much it.…We do want to configure it though a little bit,…because actually I don't even know what's going to happen…if I tried to run it without configuring it.…Yeah, it actually just works magically,…which is pretty cool.…But we want to also, like, make sure that we're…maintaining a threshold of code coverage in our project.…
Actually, sorry I should stop.…Has anybody gotten to this point, where you have…like the report and everything?…You ran the tests and it's reporting?…Anybody like working with me on this?…
Note: This course was created by Frontend Masters. It was originally released on 08/09/2016. We're pleased to host this training in our library.
- Creating an open-source library
- Linting and testing
- Code coverage
- Installing and configuring Babel
- Peer dependencies
- Forking and renaming
- Continuous integration and automating releases
Skill Level Intermediate
1. Creating an Open-Source Library
2. Linting and Testing
3. Git Hooks, Babel, and Webpack
4. Continuous Integration and Automating Releases
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.