0Pricing
Dart Academy · Lesson

Mocks, Fakes, and Coverage

Isolate units and measure what you test.

Isolate the Unit

A unit test should check one piece in isolation. Real databases or networks make tests slow and flaky, so we replace them. 🔌

Test Doubles

A test double stands in for a real dependency. Mocks, fakes, and stubs are the common flavors you reach for.

All lessons in this course

  1. Your First test and expect
  2. group, setUp, and tearDown
  3. Testing async Code and Streams
  4. Mocks, Fakes, and Coverage
← Back to Dart Academy