|
6 | 6 | [](https://codecov.io/gh/openapi-library/OpenAPIValidators) |
7 | 7 | [](https://github.com/openapi-library/OpenAPIValidators/blob/master/CONTRIBUTING.md) |
8 | 8 |
|
9 | | -Chai and Jest support for asserting that HTTP responses satisfy an OpenAPI spec. |
| 9 | +Use Jest or Chai to assert that HTTP responses satisfy an OpenAPI spec. |
10 | 10 |
|
11 | 11 | ## Problem 😕 |
12 | 12 |
|
13 | 13 | If your server's behaviour doesn't match your API documentation, then you need to correct your server, your documentation, or both. The sooner you know the better. |
14 | 14 |
|
15 | 15 | ## Solution 😄 |
16 | 16 |
|
17 | | -These test plugins let you automatically test whether your server's behaviour and documentation match. They extend Chai and Jest to support the [OpenAPI standard](https://swagger.io/docs/specification/about/) for documenting REST APIs. In your JavaScript tests, you can simply assert `expect(responseObject).toSatisfyApiSpec()` |
18 | | - |
19 | | -### [Chai OpenAPI Response Validator](https://github.com/openapi-library/OpenAPIValidators/tree/master/packages/chai-openapi-response-validator#readme) |
20 | | - |
21 | | -[](https://www.npmjs.com/package/chai-openapi-response-validator) |
22 | | -[](https://www.npmjs.com/package/chai-openapi-response-validator) |
| 17 | +These test plugins let you automatically test whether your server's behaviour and documentation match. They extend Jest and Chai to support the [OpenAPI standard](https://swagger.io/docs/specification/about/) for documenting REST APIs. In your JavaScript tests, you can simply assert `expect(responseObject).toSatisfyApiSpec()` |
23 | 18 |
|
24 | 19 | ### [jest-openapi](https://github.com/openapi-library/OpenAPIValidators/tree/master/packages/jest-openapi#readme) |
25 | 20 |
|
26 | 21 | [](https://www.npmjs.com/package/jest-openapi) |
27 | 22 | [](https://www.npmjs.com/package/jest-openapi) |
28 | 23 |
|
| 24 | +### [Chai OpenAPI Response Validator](https://github.com/openapi-library/OpenAPIValidators/tree/master/packages/chai-openapi-response-validator#readme) |
| 25 | + |
| 26 | +[](https://www.npmjs.com/package/chai-openapi-response-validator) |
| 27 | +[](https://www.npmjs.com/package/chai-openapi-response-validator) |
| 28 | + |
29 | 29 | ## Contributors ✨ |
30 | 30 |
|
31 | 31 | <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> |
|
0 commit comments