Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the purpose of unit testing?
Think about what happens if a piece of code does not perform as intended.
What is Jest commonly used for?
Consider what testing framework you might use for your JavaScript code.
What does Jest help you do?
Consider the purpose of a testing framework.
True or False: Unit tests ensure that parts of an application work correctly in isolation.
Think about the scope of unit testing.
Implement a function that calculates the factorial of a number and write a test for it using Jest. How would you assert for the correct output?
Factorial means multiplying the number by all positive integers less than it.
Discuss how you would structure a Jest configuration file for a larger project with multiple test files.
Think about what settings a large project might require for industry standards.
5 more questions in this section. Enroll free to practise them all.
Enroll free