Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributegiven_when_then_unit_test

BDD-style helpers for writing readable Dart unit tests

pub.devRemove
mockito

A mock framework inspired by Mockito with APIs for Fakes, Mocks, behavior verification, and stubbing.

pub.devRemove
ScoresHealth4787 (best)
Maintenance080 (best)
Quality100 (best)87
Popularity2795 (best)
Community4680 (best)
Compatibility100100
UsageDownloads (30 days)9562.8M (best)
Likes201.5k (best)
Pub points160 / 160 (best)130 / 160
GitHub stars3871 (best)
MaintenanceLatest release0.2.1, 3 years ago5.8.1, 4 months ago (best)
Major versions in 12 months00
Contributors2100+ (best)
Publisherdevcraft.ninjadart.dev
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationNoYes
Direct dependencies2 (best)10
LicenseMITAPACHE-2.0
Setup effortLowMedium
JudgementStrengths
  • improves test readability and documentation
  • auto-generates descriptive test names
  • supports async tests and fixtures
  • provides generic test case helpers
  • Robust behavior verification and stubbing features.
  • Supports null safety and generates nice mocks to avoid runtime type exceptions.
Weaknesses
  • conflicts with mocktail/mockito due to `when` keyword
  • limited to unit tests, not integration or widget tests
  • no code generation or advanced features
  • Requires running build_runner for code generation.
  • Has an awkward syntax requirement for naming arguments within argument matchers.
WarningsNoneNone
given_when_then_unit_test vs mockito: which Flutter package should you use? | pubscout