mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
added more checks in test
This commit is contained in:
@@ -510,7 +510,7 @@ module.exports = {
|
||||
}
|
||||
/* eslint-enable */
|
||||
else {
|
||||
// recurse over child leaf nodes
|
||||
// recurse over child leaf nodes
|
||||
// and add as children to this folder
|
||||
for (i = 0, requestCount = resource.requests.length; i < requestCount; i++) {
|
||||
itemGroup.items.add(
|
||||
@@ -520,7 +520,7 @@ module.exports = {
|
||||
|
||||
// recurse over child folders
|
||||
// and add as child folders to this folder
|
||||
/* eslint-disable */
|
||||
/* eslint-disable max-depth*/
|
||||
for (subChild in resource.children) {
|
||||
if (resource.children.hasOwnProperty(subChild) && resource.children[subChild].requestCount > 0) {
|
||||
itemGroup.items.add(
|
||||
|
||||
@@ -51,6 +51,9 @@ describe('CONVERT FUNCTION TESTS ', function() {
|
||||
expect(conversionResult.output[0].type).to.equal('collection');
|
||||
expect(conversionResult.output[0].data).to.have.property('info');
|
||||
expect(conversionResult.output[0].data).to.have.property('item');
|
||||
expect(conversionResult.output[0].data.item[0].name).to.equal('pets/a/b');
|
||||
expect(conversionResult.output[0].data.item[0].item[0].request.method).to.equal('GET');
|
||||
expect(conversionResult.output[0].data.item[0].item[1].request.method).to.equal('POST');
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user