Unit Test Flashcards
What are unit tests?
A unit test is a way of testing a unit - the smallest piece of code that can be logically isolated in a system. In most programming languages, that is a function, a subroutine, a method or property.
Why is it important to write unit tests?
a good way to debug your code. Gives you tons of confidence when you refactor your code.
What code should be tested with a unit test? What code is not well suited for unit tests?
a small unit is good to test. large blocks of code not good to test. use end-to-end testing for large blocks of code/applicatuib
What is Jest? What are some other popular JavaScript unit testing frameworks?
Jest is a JavaScript testing framework designed to ensure correctness of any JavaScript codebase.
Other popular JavaScript testing frameworks are:
Mocha, Storybook, Jasmine, Cypress, Puppeteer, Ava, and a lot more!