mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-25 00:40:39 +00:00
f3b08868be
- Fixed test coverage calculation - Removed `mockito` from the application mock - Implemented platform channel mocks to mimic incident light metering - Covered providers with unit tests - Covered metering screen pickers with widget tests - Laid foundation for integration tests
12 lines
No EOL
660 B
Bash
12 lines
No EOL
660 B
Bash
flutter test --coverage
|
|
flutter test integration_test --flavor=dev --coverage
|
|
|
|
file=test/coverage_helper_test.dart
|
|
echo "// Helper file to make coverage work for all dart files\n" > $file
|
|
echo "// ignore_for_file: unused_import, directives_ordering" >> $file
|
|
find lib '!' -path '*generated*/*' '!' -name '*.g.dart' '!' -name '*.part.dart' -name '*.dart' | cut -c4- | awk -v package=$1 '{printf "import '\''package:lightmeter%s%s'\'';\n", package, $1}' >> $file
|
|
echo "void main() {}" >> $file
|
|
|
|
lcov --remove coverage/lcov.info 'lib/generated/*' 'lib/l10n/*' -o coverage/new_lcov.info
|
|
genhtml coverage/new_lcov.info -o coverage/html
|
|
open coverage/html/index.html |