Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/macros/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ async fn basic_test(pool: PgPool) -> sqlx::Result<()> {
# }
```

Note that if you have a large number of tests and migrations, embedding the migrations next to each `#[sqlx::test]` can significantly slow down compilation times. In that case consider storing the migrations into a shared variable in your crate and then reference that variable using `migrator = <path>` in each test.

### Automatic Fixture Application (requires `migrate` feature)

Since tests are isolated from each other but may require data to already exist in the database to keep from growing
Expand Down
Loading