From 0ee966a1b605c54ade40672138bbd8579f87d150 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 16:06:27 +0000 Subject: [PATCH 1/3] chore(deps): bump very_good_analysis from 9.0.0 to 10.0.0 Bumps [very_good_analysis](https://github.com/VeryGoodOpenSource/very_good_analysis) from 9.0.0 to 10.0.0. - [Release notes](https://github.com/VeryGoodOpenSource/very_good_analysis/releases) - [Changelog](https://github.com/VeryGoodOpenSource/very_good_analysis/blob/main/CHANGELOG.md) - [Commits](https://github.com/VeryGoodOpenSource/very_good_analysis/compare/v9.0.0...v10.0.0) --- updated-dependencies: - dependency-name: very_good_analysis dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 3f6dd6c..c4ddf79 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,4 +17,4 @@ dependencies: test: ^1.25.7 dev_dependencies: - very_good_analysis: ^9.0.0 + very_good_analysis: ">=9.0.0 <11.0.0" From 4f96f97fbf9dbfe2313a991aaa246567bea5b68d Mon Sep 17 00:00:00 2001 From: Marcos Sevilla <31174242+marcossevilla@users.noreply.github.com> Date: Mon, 22 Sep 2025 04:58:17 -0400 Subject: [PATCH 2/3] Update pubspec.yaml --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index c4ddf79..b33cc4c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,4 +17,4 @@ dependencies: test: ^1.25.7 dev_dependencies: - very_good_analysis: ">=9.0.0 <11.0.0" + very_good_analysis: ^10.0.0 From 4a574f804f6846fbb2094c8d580115d04951deb0 Mon Sep 17 00:00:00 2001 From: Marcos Sevilla Date: Mon, 22 Sep 2025 11:04:29 +0200 Subject: [PATCH 3/3] fix: VGA constraint --- .github/workflows/example.yaml | 4 +- .github/workflows/main.yaml | 9 +- example/pubspec.yaml | 6 +- lib/src/matcher_extensions.dart | 1 - pubspec.yaml | 4 +- test/src/matchers_test.dart | 163 +++++++++++++++++--------------- 6 files changed, 94 insertions(+), 93 deletions(-) diff --git a/.github/workflows/example.yaml b/.github/workflows/example.yaml index 957cef7..1394f0d 100644 --- a/.github/workflows/example.yaml +++ b/.github/workflows/example.yaml @@ -19,7 +19,7 @@ jobs: build: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 with: + runs_on: macos-latest flutter_channel: stable - flutter_version: "3.32.0" + flutter_version: "3.35.x" working_directory: example - runs_on: macos-latest diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e47b1c8..5b6644d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -17,17 +17,10 @@ jobs: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 build: - strategy: - matrix: - flutter-version: - # The version of Flutter to use should use the minimum Dart SDK version supported by the package, - # refer to https://docs.flutter.dev/development/tools/sdk/releases. - - "3.32.0" - - "3.x" uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 with: flutter_channel: stable - flutter_version: ${{ matrix.flutter-version }} + flutter_version: "3.35.x" package_get_excludes: example spell-check: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 05edd30..012fbb1 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,8 +4,8 @@ version: 0.0.1 homepage: https://github.com/VeryGoodOpenSource/mockingjay environment: - sdk: ^3.8.0 - flutter: ^3.32.0 + sdk: ^3.9.0 + flutter: ^3.35.0 dependencies: bloc: ^9.0.0 @@ -22,7 +22,7 @@ dev_dependencies: mockingjay: path: ../ mocktail: ^1.0.4 - very_good_analysis: ^9.0.0 + very_good_analysis: ^10.0.0 flutter: uses-material-design: true diff --git a/lib/src/matcher_extensions.dart b/lib/src/matcher_extensions.dart index 5164477..c3b1050 100644 --- a/lib/src/matcher_extensions.dart +++ b/lib/src/matcher_extensions.dart @@ -8,7 +8,6 @@ extension MatcherExtensions on Matcher { } /// Returns the mismatch description of this matcher as a string. - // ignore: avoid_positional_boolean_parameters String describeMismatchAsString( dynamic item, Map matchState, { diff --git a/pubspec.yaml b/pubspec.yaml index b33cc4c..883201d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,8 +4,8 @@ version: 2.0.0 homepage: https://github.com/VeryGoodOpenSource/mockingjay environment: - sdk: ^3.8.0 - flutter: ">=3.32.0" + sdk: ^3.9.0 + flutter: ^3.35.0 dependencies: flutter: diff --git a/test/src/matchers_test.dart b/test/src/matchers_test.dart index 4c726a7..0bc0c51 100644 --- a/test/src/matchers_test.dart +++ b/test/src/matchers_test.dart @@ -66,23 +66,23 @@ void main() { expect(createRoute(name: '/test'), isRoute()); }); - test('does not match anything that is not a route', () { - expectToFail( + test('does not match anything that is not a route', () async { + await expectToFail( 1, isRoute(), withMessage: 'is not a route but an instance of `int`', ); - expectToFail( + await expectToFail( 'a', isRoute(), withMessage: 'is not a route but an instance of `String`', ); - expectToFail( + await expectToFail( null, isRoute(), withMessage: 'is not a route but an instance of `Null`', ); - expectToFail( + await expectToFail( const SizedBox(), isRoute(), withMessage: 'is not a route but an instance of `SizedBox`', @@ -96,23 +96,26 @@ void main() { expect(createRoute(name: '/test'), isRoute()); }); - test('does not match anything that is not a route of that type', () { - expectToFail( - createRoute(), - isRoute(), - withMessage: 'is a route of type `dynamic` instead of `String`', - ); - expectToFail( - createRoute(name: '/test'), - isRoute(), - withMessage: 'is a route of type `dynamic` instead of `String`', - ); - expectToFail( - 1, - isRoute(), - withMessage: 'is not a route but an instance of `int`', - ); - }); + test( + 'does not match anything that is not a route of that type', + () async { + await expectToFail( + createRoute(), + isRoute(), + withMessage: 'is a route of type `dynamic` instead of `String`', + ); + await expectToFail( + createRoute(name: '/test'), + isRoute(), + withMessage: 'is a route of type `dynamic` instead of `String`', + ); + await expectToFail( + 1, + isRoute(), + withMessage: 'is not a route but an instance of `int`', + ); + }, + ); }); group('with whereSettings argument', () { @@ -134,14 +137,14 @@ void main() { }); test('does not match anything that is not a route ' - 'with matching settings', () { - expectToFail( + 'with matching settings', () async { + await expectToFail( createRoute(name: '/test'), isRoute(whereSettings: equalsSettingsOf(createRoute())), withMessage: "is a route where `settings` has `name` with value '/test'", ); - expectToFail( + await expectToFail( createRoute(name: '/other_name'), isRoute( whereSettings: equalsSettingsOf( @@ -155,7 +158,7 @@ is a route where `settings` has `name` with value '/other_name' which is differe ^ Differ at offset 1''', ); - expectToFail( + await expectToFail( 1, isRoute(whereSettings: equalsSettingsOf(createRoute())), withMessage: 'is not a route but an instance of `int`', @@ -175,29 +178,32 @@ is a route where `settings` has `name` with value '/other_name' which is differe ); }); - test('does not match anything that is not a route with that name', () { - expectToFail( - createRoute(), - isRoute(whereName: equals('/test')), - withMessage: - "is a route where the route's `name` is empty instead of '/test'", - ); - expectToFail( - createRoute(name: '/other_name'), - isRoute(whereName: equals('/test')), - withMessage: ''' + test( + 'does not match anything that is not a route with that name', + () async { + await expectToFail( + createRoute(), + isRoute(whereName: equals('/test')), + withMessage: + "is a route where the route's `name` is empty instead of '/test'", + ); + await expectToFail( + createRoute(name: '/other_name'), + isRoute(whereName: equals('/test')), + withMessage: ''' is a route where the route's `name` is different. Expected: /test Actual: /other_name ... ^ Differ at offset 1''', - ); - expectToFail( - 1, - isRoute(whereName: equals('/test')), - withMessage: 'is not a route but an instance of `int`', - ); - }); + ); + await expectToFail( + 1, + isRoute(whereName: equals('/test')), + withMessage: 'is not a route but an instance of `int`', + ); + }, + ); }); group('with whereArguments argument', () { @@ -214,22 +220,22 @@ is a route where the route's `name` is different. test( 'does not match anything that is not a route with same arguments', - () { - expectToFail( + () async { + await expectToFail( createRoute(arguments: {'a': 1}), isRoute(whereArguments: equals({'a': 2})), withMessage: "is a route where the route's `arguments` " "at location ['a'] is <1> instead of <2>", ); - expectToFail( + await expectToFail( createRoute(arguments: {'a': 1}), isRoute(whereArguments: equals({'b': 1})), withMessage: "is a route where the route's `arguments` " "is missing map key 'b'", ); - expectToFail( + await expectToFail( 1, isRoute(whereArguments: equals({'a': 1})), withMessage: 'is not a route but an instance of `int`', @@ -244,15 +250,15 @@ is a route where the route's `name` is different. }); test('does not match anything that is not a route with matching ' - 'maintainState argument', () { - expectToFail( + 'maintainState argument', () async { + await expectToFail( createRoute(), isRoute(whereMaintainState: isFalse), withMessage: 'is a route where `maintainState` ' 'is true instead of false', ); - expectToFail( + await expectToFail( NonModalRoute(), isRoute(whereMaintainState: isTrue), withMessage: @@ -260,7 +266,7 @@ is a route where the route's `name` is different. 'is not a property on `NonModalRoute` and can only be used ' 'with `ModalRoute`s', ); - expectToFail( + await expectToFail( 1, isRoute(whereMaintainState: isTrue), withMessage: 'is not a route but an instance of `int`', @@ -276,33 +282,36 @@ is a route where the route's `name` is different. ); }); - test('does not match anything that is not a route with matching ' - 'fullscreenDialog argument', () { - expectToFail( - createRoute(fullscreenDialog: true), - isRoute(whereFullscreenDialog: isFalse), - withMessage: - 'is a route where `fullscreenDialog` ' - 'is true instead of false', - ); - expectToFail( - NonModalRoute(), - isRoute(whereFullscreenDialog: isFalse), - withMessage: - 'is a route where `fullscreenDialog` ' - 'is not a property on `NonModalRoute` and can only be used ' - 'with `PageRoute`s', - ); - expectToFail( - 1, - isRoute(whereFullscreenDialog: isTrue), - withMessage: 'is not a route but an instance of `int`', - ); - }); + test( + 'does not match anything that is not a route with matching ' + 'fullscreenDialog argument', + () async { + await expectToFail( + createRoute(fullscreenDialog: true), + isRoute(whereFullscreenDialog: isFalse), + withMessage: + 'is a route where `fullscreenDialog` ' + 'is true instead of false', + ); + await expectToFail( + NonModalRoute(), + isRoute(whereFullscreenDialog: isFalse), + withMessage: + 'is a route where `fullscreenDialog` ' + 'is not a property on `NonModalRoute` and can only be used ' + 'with `PageRoute`s', + ); + await expectToFail( + 1, + isRoute(whereFullscreenDialog: isTrue), + withMessage: 'is not a route but an instance of `int`', + ); + }, + ); }); - test('returns all relevant mismatches in one log', () { - expectToFail( + test('returns all relevant mismatches in one log', () async { + await expectToFail( createRoute( name: '/other_name', arguments: {'b': 1},