ash/documentation/topics/testing.md

12 lines
382 B
Markdown
Raw Normal View History

2022-08-31 06:27:03 +12:00
# Testing
## Async tests
The first thing you will likely want to do, especially if you are using `AshPostgres`, is to add the following config to your `config/test.exs`.
```elixir
# config/test.exs
2022-08-20 10:35:22 +12:00
config :ash, :disable_async?, true
2022-08-31 06:27:03 +12:00
```
This ensures that Ash does not spawn tasks when executing your requests, which is necessary for doing transactional tests with `AshPostgres`.