Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
refactor: Improve test coverage #56
Browse files Browse the repository at this point in the history
  • Loading branch information
joolfe committed Aug 2, 2020
1 parent f6c3148 commit 6769c0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 1 addition & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,12 @@ function parseBody (body = {}, method) {
'text/plain': {}
}
break
default:
content = {}
break
}
return { requestBody: { content } }
}

/* Parse the Postman query and header and transform into OpenApi parameters */
function parseParameters (query = [], header = [], paths) {
function parseParameters (query = [], header, paths) {
// parse Headers
let parameters = header.reduce(mapParameters('header'), [])
// parse Query
Expand Down
5 changes: 5 additions & 0 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ describe('Library specs', function () {
type: 'http',
scheme: 'basic',
description: 'My awesome authentication using user and password'
},
notSupported: {
type: 'http',
scheme: 'digest',
description: 'Not supported security'
}
}
const result = await postmanToOpenApi(COLLECTION_BASIC, OUTPUT_PATH, { auth: authDefinition })
Expand Down

0 comments on commit 6769c0d

Please sign in to comment.