Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Jest and Enzyme Testing

Course Summary

The Jest and Enzyme Testing course is designed to provide a comprehensive training on testing with Jest and Enzyme.

This course begins with an introduction to both Jest and Enzyme including a review of class architecture, test applications and using Jest and Enzyme to validate accessibility requirements. Students will then explore how to do tests, code coverage, and snapshots. The course concludes with a dive into test mocking, shallow rendering of components, and full rendering.

This course uses a mixture of lecture and hands-on labs to reinforce learning.

Purpose
Learn the workings of the Jest testing framework along with the testing utility Enzyme.
Audience
Web Developers and Q/As looking to adopt Jest and Enzyme.
Role
Q/A - Software Developer - Web Developer
Skill Level
Intermediate
Style
Workshops
Duration
2 Days
Related Technologies
JavaScript | Testing

 

Productivity Objectives
  • Use Jest for basic testing
  • Test asynchronous functionality with Jest
  • Set up and work with Enzyme
  • Use Enzyme to test React components
  • Compare shallow and full rendering of components in Enzyme
  • Establish code coverage in testing

What You'll Learn:

In the Jest and Enzyme Testing training course, you'll learn:
  • Class Architecture
    • React with create-react-app
    • Enzyme
    • Jest
    • Node
    • VSCode
    • Other tools
  • Test Application
    • Front-end with React
    • Simple back-end
    • Focusing on unit testing components
  • Starting with Jest
    • Using Jest/Enzyme to validate accessibility requirements
    • Running tests under Jest
    • Jest Testing Outline
      • Discover()
      • It() / test()
      • Running code before and after tests
    • Matchers
    • Reporters
  • Code Coverage
    • What is code coverage?
    • Snapshots
  • Test Mocking
    • Unit testing vs integration testing
    • Mocks help maintain boundaries
    • Mocking components
    • Mocking functions
    • Asynchronous functions
    • To mock, or not to mock?
  • Enzyme and shallow rendering
    • Role of Enzyme
      • Enzyme vs Jest, Enzyme with Jest
    • Enzyme Configuration
    • Shallow rendering of a component
  • Full rendering
    • Unit vs integration testing re-visited
    • When should I use full rendering?
    • The full API vs the shallow API
    • Accessing subcomponents in a full render
  • Putting it all together
    • Capstone Lab Exercise
“I appreciated the instructor's technique of writing live code examples rather than using fixed slide decks to present the material.”

VMware

Dive in and learn more

When transforming your workforce, it's important to have expert advice and tailored solutions. We can help. Tell us your unique needs and we'll explore ways to address them.

Let's chat

By filling out this form and clicking submit, you acknowledge our privacy policy.