Skip to content

Commit

Permalink
docs: Add package testing documentation to README (#1011)
Browse files Browse the repository at this point in the history
docs: add package testing documentation to README
  • Loading branch information
Vinzent03 authored Aug 26, 2024
1 parent 3eeb3b4 commit 8094e8f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,32 @@ To install on a locally developed app:
path: <your-path-to-the-local-supabase-flutter-repo>/packages/supabase_flutter
```
## Testing
The tests for the packages `postgrest`, `gotrue` and `storage_client` need some Supabase services running.
To run these tests locally, you need to have the `docker` cli with `docker-compose` installed.

The needed configuration for starting the services are in the `infra` directory.

To start the services change working directory to `infa/<package>` and run the following command:

```bash
docker compose up -d
```

Run the Dart tests within the package directory in `packages/<package>` with the following command:
The `-j 1` flag runs the tests not concurrently, which works better since the tests are running against the same services.

```bash
dart test -j 1
```

To stop the services run the following command in the `infra/<package>` directory:

```bash
docker compose down
```

## Contributing

- Fork the repo on [GitHub](https://github.com/supabase/supabase-flutter)
Expand Down

0 comments on commit 8094e8f

Please sign in to comment.