mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
add test scenario
This commit is contained in:
committed by
Erik Mendoza
parent
789f2e3522
commit
69906ff98a
@@ -204,4 +204,17 @@ describe('getRelatedEntities function', function () {
|
||||
expect(missingRelatedEntities.length).to.equal(1);
|
||||
expect(missingRelatedEntities[0].$ref).to.equal('#/components/schemas/Dog');
|
||||
});
|
||||
|
||||
it('should ignore external references', function () {
|
||||
const inputNode = {
|
||||
type: 'array',
|
||||
items: {
|
||||
$ref: 'pet.yaml'
|
||||
}
|
||||
},
|
||||
{ relatedEntities, missingRelatedEntities } = getRelatedEntities(inputNode, mockedInputPetstore);
|
||||
expect(relatedEntities.length).to.equal(1);
|
||||
expect(missingRelatedEntities.length).to.equal(0);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user