Curated examples to try out unit test generation with welltested.
The repository consists of following types of examples:
No external dependencies and hence no mocking required.
lib/utility/calculator.dart
- Basic arithmetic operations .
External dependencies need to be mocked and simulated.
lib/network_clients/dio_client.dart
: Network request with Dio Client mocked.
- First, activate the cli using
dart pub global activate welltested
. - In the root of your project, do a
welltested init
and insert your API Key.
For reference, you may find the final generated tests in the /generated-tests
branch