Skip to content

Commit e0941e0

Browse files
fixed tests
1 parent eeab15b commit e0941e0

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

test/unit/base.test.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,21 +2012,24 @@ describe('INTERFACE FUNCTION TESTS ', function () {
20122012
});
20132013
});
20142014

2015-
describe('The converter must identify valid OA3 & 3.1 specifications', function () {
2015+
describe('The converter must identify valid OA3 specification', function () {
20162016
var pathPrefix = VALID_OPENAPI_PATH,
2017-
sampleSpecs = fs.readdirSync(path.join(__dirname, pathPrefix));
2017+
sampleSpecs = fs.readdirSync(path.join(__dirname, pathPrefix)),
2018+
oa3_1_files = ['issue#479_2.yaml', 'issue#10229.json', 'query_param_with_enum_resolve_as_example.json'];
20182019

20192020
sampleSpecs.map((sample) => {
2020-
var specPath = path.join(__dirname, pathPrefix, sample);
2021+
if (!oa3_1_files.includes(sample)) {
2022+
var specPath = path.join(__dirname, pathPrefix, sample);
20212023

2022-
it(specPath + ' is valid ', function(done) {
2023-
var openapi = fs.readFileSync(specPath, 'utf8'),
2024-
validationResult = Converter.validate({ type: 'string', data: openapi });
2024+
it(specPath + ' is valid ', function(done) {
2025+
var openapi = fs.readFileSync(specPath, 'utf8'),
2026+
validationResult = Converter.validate({ type: 'string', data: openapi });
20252027

2026-
expect(validationResult.result).to.equal(true);
2027-
expect(validationResult.specificationVersion).to.be.oneOf(['3.0.x', '3.1.x']);
2028-
done();
2029-
});
2028+
expect(validationResult.result).to.equal(true);
2029+
expect(validationResult.specificationVersion).to.equal('3.0.x');
2030+
done();
2031+
});
2032+
}
20302033
});
20312034
});
20322035

0 commit comments

Comments
 (0)