mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Set path as null
set path as null instead of undefined
This commit is contained in:
committed by
Erik Mendoza
parent
c455e60ac5
commit
e040455f46
@@ -168,7 +168,7 @@ function getAdjacentAndMissing (currentNode, allData, specRoot) {
|
||||
missingNodes.push({ path: calculatedPathForMissing.path });
|
||||
}
|
||||
else {
|
||||
missingNodes.push({ $ref: calculatedPathForMissing.$ref });
|
||||
missingNodes.push({ $ref: calculatedPathForMissing.$ref, path: null });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -167,7 +167,7 @@ describe('getRelatedFiles function ', function () {
|
||||
expect(missingRelatedFiles.length).to.equal(2);
|
||||
expect(missingRelatedFiles[0].path).to.equal('/Pet.yaml');
|
||||
expect(missingRelatedFiles[0].$ref).to.be.undefined;
|
||||
expect(missingRelatedFiles[1].path).to.be.undefined;
|
||||
expect(missingRelatedFiles[1].path).to.equal(null);
|
||||
expect(missingRelatedFiles[1].$ref).to.equal('../../common/Error.yaml');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user