dart-lang / mockito

Mockito-inspired mock library for Dart
https://pub.dev/packages/mockito
Apache License 2.0
632 stars 162 forks source link

Can't run flutter test when I add mockito, due to test_api #688

Closed FilledStacks closed 1 year ago

FilledStacks commented 1 year ago

I've added mockito and generated my mocks.

Mockito imports test_api and test_api fails all my tests with the following output.

./../../../src/flutter/packages/flutter_test/lib/src/_goldens_io.dart:12:8: Error:
Error when reading
'../../../../.pub-cache/hosted/pub.dev/test_api-0.6.1/lib/expect.dart': No such file
or directory
import 'package:test_api/expect.dart' show fail;
       ^
../../../../src/flutter/packages/flutter_test/lib/src/binding.dart:17:8: Error: Error
when reading '../../../../.pub-cache/hosted/pub.dev/test_api-0.6.1/lib/expect.dart':
No such file or directory
import 'package:test_api/expect.dart' show fail;
       ^
../../../../src/flutter/packages/flutter_test/lib/src/_matchers_io.dart:10:8: Error:
Error when reading
'../../../../.pub-cache/hosted/pub.dev/test_api-0.6.1/lib/src/expect/async_matcher.da
rt': No such file or directory
import 'package:test_api/src/expect/async_matcher.dart'; // ignore:
implementation_imports
       ^
../../../../src/flutter/packages/flutter_test/lib/src/matchers.dart:13:8: Error:
Error when reading
'../../../../.pub-cache/hosted/pub.dev/test_api-0.6.1/lib/src/expect/async_matcher.da
rt': No such file or directory
import 'package:test_api/src/expect/async_matcher.dart'; // ignore:
implementation_imports

I need some guidance on what this issue is and how to fix it.

Packages in use