In this exercise, you will write unit tests that cover the starWarsNames.all() and starWarsNames.random() methods. To start, Kent provides some pseudo-code and a few hints. He also talks a little about the dont-break NPM package that verifies changes to one project don’t break dependent projects.
(groovy music)…- Now that we have verified that…we have our testing framework set up and stuff,…let's go ahead and write the test.…This will be just another fun exercise.…Oh yeah, don't forget to check out…the next branch, make sure we're all on the same page.…So that is an FEM/05.0-setup-tests…and with that, sometimes my highlighting doesn't update,…but, those files are there.…
Oh, I totally forgot to set up the watch command,…so this is the watch command, it's just mocha --watch…and because we have the mocha ops here,…it's going to point directly to our index.test file there.…So, this is what I recommend while you're…writing your tests for libraries.…Who here is, actually before I do that,…who here is familiar with TDD?…Know what that term means, okay, several of you.…It stands for test-driven development.…Test-driven development is like,…this is also yet another preferential like,…controversial almost, thing.…
Some people really, really like it,…some people really, really don't.…I really, really like it for libraries.…
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.