mobile bluesky app made with flutter lazurite.stormlightlabs.org/
mobile bluesky flutter
at main 33 lines 1.4 kB view raw view rendered
1# Testing Guide 2 3Overview of the testing strategy, organization, and execution in Lazurite. 4 5## Running Tests 6 7Use the `just` recipes for a consistent testing experience: 8 9- `just test`: Run tests with a 60s timeout and verbose output. 10- `just test-quiet`: Run tests with a 30s timeout and quiet output (failures only). Useful for identifying hanging tests or pinpointing errors. 11- `just check`: Run format, lint, and all tests. Recommended before any commit. 12 13## Organization 14 15Test files must mirror the `lib/src` directory structure. 16 17- Source: `lib/src/features/feed/application/feed_notifier.dart` 18- Test: `test/src/features/feed/application/feed_notifier_test.dart` 19 20All shared test helpers and mocks are located in `test/helpers/`. 21 22## Core Documentation 23 24- [**Testing Patterns**](./PATTERNS.md): Guidance on Riverpod, Drift, and Async patterns. 25- [**Tests By Type**](./BY_TYPE.md): Specific setup and examples for Widget, Repository, DAO, and Router tests. 26- [**Troubleshooting & Pitfalls**](./TROUBLESHOOTING.md): Solutions for common issues like pending timers, memory leaks, and font loading. 27 28## Reference Examples 29 30- **Widget Tests:** `test/src/features/search/presentation/screens/search_screen_test.dart` 31- **Repository Tests:** `test/src/features/feeds/infrastructure/feed_repository_test.dart` 32- **DAO Tests:** `test/src/infrastructure/db/daos/saved_feeds_dao_test.dart` 33- **Router Tests:** `test/src/app/router_test.dart`