coverage

This command is currently experimental, so any breaking changes can be introduced at any minor version.

Checks the percentage of package widgets that are covered by at least one use-case in Widgetbook.

Usage

widgetbook coverage

Arguments

The CLI accepts the following arguments.

ArgumentMandatoryDefault*Description
--package./Directory of the app or the design system package
--widgetbook./widgetbookDirectory of the widgetbook app
--min-coverage100Minimum coverage percentage required

Ignoring Widgets

Some widgets are not meant to be cataloged in Widgetbook (e.g. App widget). You can ignore these widgets by adding the following comment above the widget definition:

// widgetbook: ignore
class App extends StatelessWidget { ... }