Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is unit testing?
Think about testing small parts of your code.
Name a popular JavaScript testing framework.
It's often used with React.
What is the purpose of unit testing?
Think about testing small parts of a larger system.
True or False: Jest is the only unit testing framework available.
Consider the alternatives to Jest.
Create a series of unit tests for a function that calculates the factorial of a number. Ensure it handles edge cases like zero and negative numbers.
Consider using if statements to handle different cases.
Using Jest, write a test case that mocks an API call to return a specific response and verifies if your component uses that data correctly.
Use jest.fn() to create the mock function effectively.
5 more questions in this section. Enroll free to practise them all.
Enroll free