Skip to main content

tarpit 0.1.1 copy "tarpit: ^0.1.1" to clipboard
tarpit: ^0.1.1 copied to clipboard

Find widget-test code that can hang in FakeAsync, and fail a stalled testWidgets fast. An analyzer-based CLI (text, JSON, SARIF) plus a watchdog.

example/README.md

tarpit example #

lib/greeting_card.dart is a small widget. test/stalls_test.dart tests it in three ways that stall or fail inside FakeAsync; test/fixed_test.dart is the same three tests written so they pass.

flutter pub get
dart run tarpit                        # 3 findings in stalls_test.dart, exit 1
flutter test test/fixed_test.dart      # passes
flutter test test/stalls_test.dart     # fails in seconds instead of hanging

stalls_test.dart imports package:tarpit/flutter_test.dart, so its testWidgets run under the watchdog, and test/flutter_test_config.dart sets the limit for the whole directory.

0
likes
160
points
861
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Find widget-test code that can hang in FakeAsync, and fail a stalled testWidgets fast. An analyzer-based CLI (text, JSON, SARIF) plus a watchdog.

Repository (GitHub)
View/report issues
Contributing

Topics

#testing #flutter #lint #ci #static-analysis

License

MIT (license)

Dependencies

analyzer, args, flutter, flutter_test, meta, path

More

Packages that depend on tarpit