-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c58b39e
commit 14b547a
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |