visibleForTesting top-level constant
Used to annotate a declaration was made public, so that it is more visible than otherwise necessary, to make code testable.
Tools, such as the analyzer, can provide feedback if
- the annotation is associated with a declaration not in the
lib
folder of a package, or - the declaration is referenced outside of its the defining library or a
library which is in the
test
folder of the defining package.
Implementation
const _VisibleForTesting visibleForTesting = const _VisibleForTesting()