forked from ferdikoomen/openapi-typescript-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.spec.ts
35 lines (31 loc) · 1.08 KB
/
index.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import OpenAPI from './index';
describe('index', () => {
it('parses v2 without issues', async () => {
await OpenAPI.generate({
input: './test/spec/v2.json',
output: './generated/v2/',
write: false,
});
});
it('parses v3 without issues', async () => {
await OpenAPI.generate({
input: './test/spec/v3.json',
output: './generated/v3/',
write: false,
});
});
it('downloads and parses v2 without issues', async () => {
await OpenAPI.generate({
input: 'https://raw.githubusercontent.com/ferdikoomen/openapi-typescript-codegen/master/test/spec/v2.json',
output: './generated/v2-downloaded/',
write: false,
});
});
it('downloads and parses v3 without issues', async () => {
await OpenAPI.generate({
input: 'https://raw.githubusercontent.com/ferdikoomen/openapi-typescript-codegen/master/test/spec/v3.json',
output: './generated/v3-downloaded/',
write: false,
});
});
});