This repository was archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathcomponents-test.js
84 lines (69 loc) · 2.76 KB
/
components-test.js
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const path = require('path');
const testParseFixture = require('./testParseFixture');
const fixtures = path.join(__dirname, 'fixtures', 'components');
describe('components', () => {
describe('Path Item Object', () => {
it('handles parameter references', () => {
const file = path.join(fixtures, 'path-item-object-parameters');
return testParseFixture(file);
});
it('handles multiple references to same parameter', () => {
const file = path.join(fixtures, 'path-item-object-parameters-multiple');
return testParseFixture(file);
});
it('handles parameter referencing unsupported parameter', () => {
const file = path.join(fixtures, 'path-item-object-parameters-unsupported-parameter');
return testParseFixture(file);
});
});
describe('Media Type Object', () => {
it('handles schema references', () => {
const file = path.join(fixtures, 'media-type-object-schema');
return testParseFixture(file);
});
it('handles multiple references to same schema', () => {
const file = path.join(fixtures, 'media-type-object-schema-multiple');
return testParseFixture(file);
});
it('handles examples references', () => {
const file = path.join(fixtures, 'media-type-object-examples');
return testParseFixture(file);
});
});
describe('Responses Object', () => {
it('handles response references', () => {
const file = path.join(fixtures, 'responses-object-response');
return testParseFixture(file);
});
it('handles multiple references to same response', () => {
const file = path.join(fixtures, 'responses-object-response-multiple');
return testParseFixture(file);
});
it('handles response references with schema', () => {
const file = path.join(fixtures, 'responses-object-response-with-schema');
return testParseFixture(file);
});
it('handles responses references with headers', () => {
const file = path.join(fixtures, 'responses-object-response-with-headers');
return testParseFixture(file);
});
});
describe('Response Object', () => {
it('handles headers references', () => {
const file = path.join(fixtures, 'response-object-headers');
return testParseFixture(file);
});
it('handles multiple references to same header', () => {
const file = path.join(fixtures, 'response-object-headers-multiple');
return testParseFixture(file);
});
});
it("'Schema Object' circular references", () => {
const file = path.join(fixtures, 'schema-object-circular');
return testParseFixture(file);
});
it("'Operation Object' requestBody references", () => {
const file = path.join(fixtures, 'operation-object-requestBody');
return testParseFixture(file);
});
});