is there a way to use external dependencies with @testable annotation in unit tests in the IOS module in a Flutter plugin?

Viewed 25

I'm writing an IOS module in a Flutter plugin and I would like to write unit tests for it.

The IOS module has one dependency and this is declared into the .podspec file. I need to use the classes from this dependency to write the unit tests. The most of classes from this dependency are set up as final therefore I need to use the @testable annotation to high access to these classes.

I have tried using the @testable annotation therefore I received this exception:

Module 'x' was not compiled for testing

Trying to solve this issue I checked out:

  • Enable Testability as Yes for the targets.
0 Answers
Related