|
| 1 | +# Tests |
| 2 | + |
| 3 | +We have a number of test suites used to verify the behavior of OpenAPI-to-GraphQL. |
| 4 | + |
| 5 | +### Tests against real-world APIs |
| 6 | + |
| 7 | +The following test suites perform a simple wrapping test and do not make call against any of the respective APIs. |
| 8 | + |
| 9 | +| API | Test file | |
| 10 | +|---|---| |
| 11 | +| N/A | `cloudfunction.test.ts` | |
| 12 | +| [DocuSign](https://www.docusign.com/) | `docusign.test.ts` | |
| 13 | +| N/A | `government_social_work.test.ts` | |
| 14 | +| [IBM Language Translator](https://www.ibm.com/watson/services/language-translator/) | `ibm_language_translator.test.ts` | |
| 15 | +| [Instagram](https://www.instagram.com/) | `instagram.test.ts` | |
| 16 | +| [Stripe](https://stripe.com/) | `stripe.test.ts` | |
| 17 | +| [Weather Underground](https://www.wunderground.com/) | `weather_underground_test.ts` | |
| 18 | + |
| 19 | +### Tests against custom APIs |
| 20 | + |
| 21 | +We have created a number of example APIs for finer grain testing. Unfortunately, for a number of reasons including difficulty keeping tests on theme and some tests requiring their own specialized APIs, the number of tests have quickly grown and do not have meaningful identifiers. |
| 22 | + |
| 23 | +The following table summarizes the purposes of these tests. |
| 24 | + |
| 25 | +| Test file | API(s) | Testing purpose | |
| 26 | +|---|---|---| |
| 27 | +| `example_api.test.ts` | `Example API` | An assortment of basic functionality and options on a company-themed API | |
| 28 | +| `authentication.test.ts` | `Example API` | Basic authentication tests including using the [viewer functionality](https://github.com/IBM/openapi-to-graphql/blob/master/packages/openapi-to-graphql/README.md#authentication) | |
| 29 | +| `example_api2.test.ts` | `Example API 2` | The [`operationIdFieldNames` option](https://github.com/IBM/openapi-to-graphql/blob/master/packages/openapi-to-graphql/README.md#options) | |
| 30 | +| `example_api3.test.ts` | `Example API` and `Example API 3` | Creating GraphQL wrappers from multiple APIs and [interOAS links](https://github.com/IBM/openapi-to-graphql/blob/master/packages/openapi-to-graphql/README.md#nested-objects) | |
| 31 | +| `example_api4.test.ts` | `Example API 4` | JSON schema [combining schema](https://json-schema.org/understanding-json-schema/reference/combining.html) keywords | |
| 32 | +| `example_api5.test.ts` | `Example API 5` | The [`simpleNames` option](https://github.com/IBM/openapi-to-graphql/blob/master/packages/openapi-to-graphql/README.md#options) | |
| 33 | +| `example_api6.test.ts` | `Example API 6` | An assortment of other functionality and options | |
| 34 | +| `example_api7.test.ts` | `Example API 7` | [Subscription support](../docs/subscriptions.md) | |
0 commit comments