The build_runner build will cache build artifacts and will only rebuild if the source files changed. This sometimes makes it hard to run unittest locally.
Suggestion: the expectBuildClean will clean the build files before running the build_runner build so that it makes sure the code is regenerated every time the test is run.
The
build_runner buildwill cache build artifacts and will only rebuild if the source files changed. This sometimes makes it hard to run unittest locally.Suggestion: the
expectBuildCleanwill clean the build files before running thebuild_runner buildso that it makes sure the code is regenerated every time the test is run.