/golden_cli

A Dart CLI made to help with multi plaform Golden comparisons in Flutter.

Primary LanguageDartBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

golden_cli

style: very good analysis

Generated by the Very Good CLI 🤖

A Dart CLI made to help with multi platform Golden comparisons in Flutter.


Getting Started 🚀

If the CLI application is available on pub, activate globally via:

dart pub global activate golden_cli

Or locally via:

dart pub global activate --source=path <path to this package>

Usage

# Execute golden test using main branch as reference
$ golden test

# cleanup
$ golden clean

# generate golden files
$ golden gen

# get goldens without generating them
$ golden get

# Using a specific branch
$ golden test -r feature/branch
$ golden clean -r feature/branch
$ golden gen -r feature/branch
$ golden get -r feature/branch

# Show CLI version
$ golden --version

# Show usage help
$ golden --help

Running Tests with coverage 🧪

To run all unit tests use the following command:

$ dart pub global activate coverage 1.2.0
$ dart test --coverage=coverage
$ dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info

To view the generated coverage report you can use lcov .

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html