Introduction to Unit Testing in Jest - The Fundamentals

5.0
stars
6 ratings
Offered By
Coursera Project Network
In this Guided Project, you will:

Learn the anatomy of a unit test in Jest

Write unit tests in Jest on real code

Clock2 hours
IntermediateIntermediate
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

In this 1-hour long project-based course on Introduction to Unit testing In Jest, we will get to explore the anatomy of a Jest unit test, and begin writing code and subsequently, the tests for that code using the Jest framework. By following this course, we will demystify unit tests and understand how we can use them to write better code. we will get practise across the general landscape of the Jest framework to and see how we can use the cool tools provided to us by the awesome Jest developers We will learn all about the syntax of a test, general rules, common matchers, and then start working with testing in asynchronous code and API fetching and then move on to mocking. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Skills you will develop

Unit TestingJest

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Task 1: Why do we write tests? Let’s write our first test to find out

  2. Task 2: Start using matchers in our tests to understand how a test works

  3. Task 3: Matchers deep dive #1

  4. Task 4: Matchers deep dive #2

  5. Task 5: Practice writing tests for asynchronous code and API calls

  6. Task 6: Using mocks in our tests

  7. Task 7: Using setup and teardown code in our tests

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.