Skip to content

Commit

Permalink
Add documentation on how to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
irby committed Oct 17, 2023
1 parent b2fa277 commit b216d88
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ easily integrated into any web app with as little as two lines of code.

- [API features](#api-features)
- [Running the backend](#running-the-backend)
- [Running tests](#running-tests)
- [Additional topics](#additional-topics)
- [Enabling password authentication](#enabling-password-authentication)
- [Cross-domain communication](#cross-domain-communication)
Expand Down Expand Up @@ -367,6 +368,20 @@ Use this command to start the public and admin API together:
serve all
```

## Running tests

Prior to running tests, you'll need to start up a test Mailslurper docker container for the tests to send emails to. You can run the Mailslurper instance by running the following command at the root directory:

```bash
docker-compose -f ./backend/test/docker-compose.test.yaml up --build -d
```

Once the instance is running, run tests with the following command within the `backend` directory:

```bash
go test -v ./...
```

## Additional topics

### Enabling password authentication
Expand Down

0 comments on commit b216d88

Please sign in to comment.