Skip to content

Commit

Permalink
Merge pull request #9 from kibertoad/chore/update-pactum
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
ASaiAnudeep authored Oct 16, 2022
2 parents 0542d06 + 4798a4d commit ebf3e0a
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 256 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ on:
pull_request:
paths-ignore:
- 'README.md'
branches:
branches:
- main
push:
paths-ignore:
- 'README.md'
branches:
branches:
- main

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node-version: [8.x, 10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ reports/
.vscode
*.tar.gz
*.tgz
/.idea/
/package-lock.json
226 changes: 0 additions & 226 deletions package-lock.json

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
},
"homepage": "https://github.com/leelaprasadv/pactum-swagger-coverage#readme",
"devDependencies": {
"pactum": "^2.0.10",
"uvu": "^0.3.4"
"pactum": "^3.1.12",
"uvu": "^0.5.4"
},
"dependencies": {
"js-yaml": "^3.14.0",
"phin": "^3.5.0"
"js-yaml": "^4.1.0",
"phin": "^3.6.1"
},
"engines": {
"node": ">=8"
Expand Down
10 changes: 5 additions & 5 deletions src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function loadSwaggerYaml() {

try {
const swaggerYamlDoc = fs.readFileSync(swaggerYAMLPath, 'utf8');
return yaml.safeLoad(swaggerYamlDoc);
return yaml.load(swaggerYamlDoc);
} catch (err) {
throw new PSCSwaggerLoadError(err)
}
Expand All @@ -44,7 +44,7 @@ async function loadSwaggerJson() {

/**
* Fuction to all get api path's from swagger file
* @param {Object} swaggerInfo
* @param {Object} swaggerInfo
* @returns {Array} Array of API paths
*/
function getApiPaths(swaggerInfo) {
Expand All @@ -55,7 +55,7 @@ function getApiPaths(swaggerInfo) {

/**
* Function to get swagger coverage stats
* @param {Array} testsCoveredApis
* @param {Array} testsCoveredApis
* @returns {object} Swagger coverage stats
*/
async function getSwaggerCoverage(testsCoveredApis) {
Expand All @@ -79,8 +79,8 @@ async function getSwaggerCoverage(testsCoveredApis) {

/**
* Function to RegEx match api paths
* @param {String} apiPath
* @param {String} rPath
* @param {String} apiPath
* @param {String} rPath
* @returns {Boolean} Match result
*/
function regExMatchOfPath(apiPath, rPath) {
Expand Down
Loading

0 comments on commit ebf3e0a

Please sign in to comment.