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

Commit

Permalink
feat: test engine setup
Browse files Browse the repository at this point in the history
  • Loading branch information
joolfe committed Jun 29, 2020
1 parent 0c2c229 commit 8ed2375
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
7 changes: 7 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict'

function postmanToOpenApi (input, output, opts) {
console.log(input + output + opts)
}

module.exports = postmanToOpenApi
28 changes: 25 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"name": "postman-to-openapi",
"version": "1.0.0",
"description": "Convert postman collection to OpenAPI spec",
"main": "index.js",
"main": "lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint **/*.js",
"lint:fix": "eslint **/*.js --fix",
"test:unit": "mocha",
"test:unit-no-only": "npm run test:unit -- --forbid-only",
"test": "nyc npm run test:unit-no-only",
"changelog:all": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
},
Expand All @@ -19,7 +23,7 @@
"collection",
"convert",
"converter",
"trsnaform",
"transform",
"specification",
"yml"
],
Expand All @@ -43,5 +47,23 @@
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"nyc": {
"all": true,
"include": [
"lib/**/*.js",
"test/**/*.js"
],
"exclude": [],
"reporter": [
"lcovonly",
"html",
"text"
],
"lines": 90,
"statements": 90,
"functions": 90,
"branches": 90,
"check-coverage": true
}
}
10 changes: 10 additions & 0 deletions test/index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict'

const { describe, it } = require('mocha')
const postmanToOpenApi = require('../lib')

describe('First test', function () {
it('test', function () {
postmanToOpenApi('', '', {})
})
})

0 comments on commit 8ed2375

Please sign in to comment.