Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu committed Dec 3, 2021
1 parent c58b39e commit 14b547a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/utils/tests/app-openapi.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { getAppOpenAPI } from "../app-openapi";

describe('getAppOpenAPI()', () => {
test('should return OpenAPI document as JSON', async () => {
const openapi = await getAppOpenAPI();
expect(openapi.openapi).toEqual('3.1.0');
expect(openapi.info.title).toEqual('AsyncAPI Server API');
});

test('should return always this same instance of JSON', async () => {
const openapi1 = await getAppOpenAPI();
const openapi2 = await getAppOpenAPI();
// assert references
expect(openapi1 === openapi2).toEqual(true);
});
});

0 comments on commit 14b547a

Please sign in to comment.