Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flutterando/full_coverage
A package script for allowing coverage test tool to see all Dart files
https://github.com/flutterando/full_coverage
Last synced: 3 days ago
JSON representation
A package script for allowing coverage test tool to see all Dart files
- Host: GitHub
- URL: https://github.com/flutterando/full_coverage
- Owner: Flutterando
- License: other
- Created: 2022-03-07T00:28:57.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-01T00:31:50.000Z (over 1 year ago)
- Last Synced: 2025-01-08T19:55:17.950Z (16 days ago)
- Language: Dart
- Size: 9.77 KB
- Stars: 7
- Watchers: 6
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# full_coverage
Coverage tools like codecov only see the files that were actually triggered by tests. This means that a coverage of 100% can easily be a lie, e.g. you can just write a dummy test that does not import any files and a coverage tool will ignore all the code base.
Luckily, this package resolves this problem.
## How it works
The **full_coverage** package harvests the power of Bash to find all files in specified directory, by default it is lib directory, where all Flutter files are. It then creates a dummy test file **test/full_coverage_test.dart** that imports all the Dart files that were found and has an empty ```void main() {}``` function so that it actually starts.
## Install
Use this command:
```dart
dart pub global activate full_coverage
```## Execute
Use the command:
```
dart pub global run full_coverage
```Or add the cache-system to your PATH environment variable for run directly.
[Check documentation](https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path) for more;```
full_coverage
```
## Other commands```
-i, --ignore Ignore files. ex (*_widget.dart,*_page.dart).
-h, --[no-]help usage doc.
```For more details [Telegram Group Flutterando](https://t.me/flutterando).