Skip to content

Commit

Permalink
chore: remove openapi testing from README
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsMissEm committed Dec 4, 2024
1 parent ba4a3a6 commit 111235b
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,6 @@ test('test title', ({ assert }) => {
})
```

## Register open API schemas
You can register open API schema and then assert HTTP responses against.

```ts
configure({
plugins: [assert({
openApi: {
schemas: [new URL('../api-spec.json', import.meta.url)]
}
})]
})
```

Validate response as follows.

```ts
test('get users', ({ assert }) => {
const response = await supertest(baseUrl).get('/users')
assert.isValidApiResponse(response)
})
```

[github-actions-url]: https://github.com/japa/assert/actions/workflows/checks.yml
[github-actions-image]: https://img.shields.io/github/actions/workflow/status/japa/assert/checks.yml?style=for-the-badge "github-actions"

Expand Down

0 comments on commit 111235b

Please sign in to comment.