Enzyme/Jest React Components Testing by Hayk Barseghyan (Arm) | JSConfAM19
summary
Shows concrete test code: uses Enzyme + Jest to run shallow/mount/render experiments, exercises event simulation and snapshot assertions, and mocks dispatches and external services to isolate components. Builds and runs tests for a login form, image rendering, animated state, and async submit flows with beforeEach/afterEach setup and fake timers. Demonstrates brittle snapshots and fixes by preferring data-test selectors and small helper wrappers to mount with providers so tests stay deterministic.
AI-written summary · about
chapters (7)
- 0:00React component testing intro
- 3:07Setup Enzyme and Jest
- 10:59First component test
- 17:46Test interactions and state
- 23:49Snapshot testing edge cases
- 28:24Simulate user actions forms
- 31:19Q&A
related talks
41mUI and Unit Testing with Airbnb's Enzyme
06mJest & Enzyme-testing your React application
16mCrushing React bugs with Jest and Enzyme
10mTesting React Applications
22mElizabeth Funk - An Introduction to React Testing Library
01h 02mWriting better tests for your JavaScript app
11mJest & Enzyme Complement Each Other.
53mTesting React Applications
