0

I was following the resoCoder Clean Architecture tutorial yesterday and was able to execute a unit test. I meanwhile continued a bit and now can no longer unit test. I have found quite a few ideas on how to overcome this here, but nothing so far works.

The answers suggest:

  • use test package instead of flutter_test package. No matter what I include, I get version conflicts. And yesterday I WAS able to execute the unit tests with the flutter_test package

  • In Run... select tests in <file name>. This leads to Error: Entrypoint file not found at...

  • In Run... select <file name>. This leads to many errors of the kind ../../Applications/flutter%20env/flutter/flutter/packages/flutter_test/lib/src/_goldens_io.dart:8:8: Error: Not found: 'dart:ui' import 'dart:ui';

Any ideas what I may have broken? I noticed this when I created an own unit test and then checked that also yesterday's test (which ran successfully) no longer runs.

This is my according yaml section

dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_lints: ^2.0.1

  mockito: ^5.3.0
  build_runner: ^2.3.2
w461
  • 2,168
  • 4
  • 14
  • 40

1 Answers1

0

More of a work around, however, I adapted the concept of the todo tutorial at bloclibrary, and separated the domain and the data layer as packages. Now I can test those with the test package and the presentation layer with the flutter_test package

w461
  • 2,168
  • 4
  • 14
  • 40