Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Latest commit

 

History

History
35 lines (23 loc) · 1.24 KB

README.md

File metadata and controls

35 lines (23 loc) · 1.24 KB

starter_examples

Curated examples to try out unit test generation with welltested.

The repository consists of following types of examples:

1. Basic

No external dependencies and hence no mocking required.

2. With External Dependencies

External dependencies need to be mocked and simulated.

To Get Started.

  1. First, activate the cli using dart pub global activate welltested.
  2. In the root of your project, do a welltested init and insert your API Key.

Steps to generate test (Basic).

  1. Annotate Calculator with @Welltested Calculator annotated
  2. Run the command: welltested generate unit Calculator tests

Steps to generate test (With External Dependencies).

  1. Annotate DioClient with @Welltested DioClient annotated
  2. Run the command: welltested generate unit DioClient tests

For reference, you may find the final generated tests in the /generated-tests branch