Search categories, packages and repositories

Package detailsv0.3.2

checks

A framework for checking values against expectations and building custom expectations.

30-day downloads
144K
Likes
125
Pub points
160

Install package

flutter pub add checks

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The checks package is a Dart framework designed to verify values against expected conditions, enabling developers to create custom assertions and validation logic. It provides a flexible foundation for writing expressive, readable tests by allowing the definition of reusable expectation rules. Built for integration with testing workflows, it supports both simple value checks and complex, domain-specific validations. The package is particularly useful in test suites where consistent, maintainable assertion patterns are needed.

Use cases

  • Writing custom test assertions
  • Validating application state in unit tests
  • Building reusable validation logic
  • Enhancing test readability with expressive expectations
  • Creating domain-specific checkers

Key features

  • Extensible expectation system
  • Support for custom checker definitions
  • Integration with Dart's testing ecosystem
  • Readable and chainable assertion syntax
  • Modular and reusable check components

Suitable for

  • Dart developers writing unit or integration tests
  • Teams needing consistent validation across test suites
  • Developers building reusable testing utilities

Considerations

  • Requires familiarity with Dart's testing framework
  • Best used within test environments
  • Not intended for runtime validation in production code
  • Limited standalone utility outside testing contexts

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Dart CI OpenSSF Scorecard

What's here?

Welcome! package:test is the standard testing library for Dart and Flutter. If you have questions about Dart testing, please see the docs for package:test. package:test_api and package:test_core are implementation details and generally not user-facing.

package:checks is a relatively new library for expressing test expectations. It's a more modern version of package:matcher and features a literate API.

Packages

Package Description Issues Version
checks A framework for checking values against expectations and building custom expectations. issues pub package
fake_async Fake asynchronous events such as timers and microtasks for deterministic testing. issues pub package
matcher Support for specifying test expectations via an extensible Matcher class. Also includes a number of built-in Matcher implementations for common cases. issues pub package
test A full featured library for writing and running Dart tests across platforms. issues pub package
test_api The user facing API for structuring Dart tests and checking expectations. pub package
test_core A basic library for writing tests and running them on the VM. pub package
test_descriptor An API for defining and verifying files and directory structures. issues pub package
test_process Test processes: starting; validating stdout and stderr; checking exit code. issues pub package

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

Rankings