equatable_expect 0.1.1 copy "equatable_expect: ^0.1.1" to clipboard
equatable_expect: ^0.1.1 copied to clipboard

This is a simple package which helps you debug while writing tests. It pinpoints what is wrong with your data when comparing Equatable objects

This is a simple package which helps you debug while writing tests. It pinpoints what is wrong with your data when comparing Equatable objects

Getting started #

Add the equatable package.

Usage #

const TwiceNestedEquatable tTwiceNestedEquatable = TwiceNestedEquatable(
    'id', tFlatEquatable, OnceNestedEquatable('id', FlatEquatable('id', 'title')));

const TwiceNestedEquatable tTwiceNestedEquatableWrong = TwiceNestedEquatable(
    'id', tFlatEquatable, OnceNestedEquatable('id', FlatEquatable('id', 'titleWrong')));

test(description, () {
  // assert
  equatableExpect(
            tTwiceNestedEquatableWrong, tTwiceNestedEquatable);
});

Which outputs:

Expected: 'title'
  Actual: 'titleWrong'
   Which: is different. Both strings start the same, but the actual value also has the following trailing characters: Wrong

Path: TwiceNestedEquatable -> OnceNestedEquatable -> FlatEquatable -> String (Actual) / String (Matcher)
0
likes
120
pub points
0%
popularity

Publisher

verified publisherantons-webfabrik.eu

This is a simple package which helps you debug while writing tests. It pinpoints what is wrong with your data when comparing Equatable objects

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

equatable, flutter, flutter_test

More

Packages that depend on equatable_expect