checks 0.2.0 copy "checks: ^0.2.0" to clipboard
checks: ^0.2.0 copied to clipboard

outdated

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

example/example.dart

// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:checks/checks.dart';
import 'package:test/scaffolding.dart';

void main() {
  test('sample test', () {
    final someValue = 5;
    check(someValue).equals(5);

    final someList = [1, 2, 3, 4, 5];
    check(someList).deepEquals([1, 2, 3, 4, 5]);

    final someString = 'abcdefghijklmnopqrstuvwxyz';

    check(someString)
      ..startsWith('a')
      ..endsWith('z')
      ..contains('lmno');
  });
}
103
likes
0
points
57.9k
downloads

Publisher

verified publisherlabs.dart.dev

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async, meta, test_api

More

Packages that depend on checks