Closed cerealexx closed 2 years ago
Please make sure to add the directory of your .mocks files in your build.yaml. If you are using mockito, then the directory is usually test
.
Here is an example build.yaml which supports the monarch directories and the test
directory:
targets:
$default:
sources:
- $package$
- lib/**
- stories/**
- test/**
The code generation will now include the test
directory, so after you run flutter pub run build_runner build
all the .mocks files in the test directory should show up.
Monarch init removes all my .mocks files and breaks code generation for them afterwards. Any ideas on how to fix this?