[testing/bdd] async `describe`
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
in vitest we can use `async` functions as a callback to `describe()`, which allows setting up group-related resource, e.g.:
```ts
describe('foo', async () => {
const foo = await createFoo()
afterAll(() => foo.destroy())
// ... tests ...
})
```
however `describe` currently doesn't allow async functions to be passed
**Describe the solution you'd like**
support async `describe` callbacks
**Describe alternatives you've considered**
- move all `await`s to top level - the downside is that group-related stuff stops being grouped
- initialize everything with a `beforeAll` hook - the downside is that we have to use non-null assertions for typescript + increases boilerplate
Contributor guide
Assessment
This issue has not been assessed yet.