aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sra-api/test/api_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sra-api/test/api_test.ts')
-rw-r--r--packages/sra-api/test/api_test.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/sra-api/test/api_test.ts b/packages/sra-api/test/api_test.ts
new file mode 100644
index 000000000..47353ca80
--- /dev/null
+++ b/packages/sra-api/test/api_test.ts
@@ -0,0 +1,15 @@
+import * as chai from 'chai';
+import * as dirtyChai from 'dirty-chai';
+import { validate } from 'openapi-schema-validation';
+
+import { api } from '../src/index';
+
+chai.config.includeStack = true;
+chai.use(dirtyChai);
+
+describe('SRA OpenAPI Schema', () => {
+ it('should be a valid OpenAPI schema', () => {
+ const result = validate(api, 3);
+ chai.expect(result.errors).to.have.length(0);
+ });
+});