Refactor (#54)
* run `npm ci` instead of `npm install` for PR build * bump version * return Promise for test mock
This commit is contained in:
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
npm install
|
||||
npm ci
|
||||
npm run all
|
||||
- uses: coverallsapp/github-action@master
|
||||
with:
|
||||
|
||||
@@ -27,8 +27,8 @@ describe('run', () => {
|
||||
path.join(__dirname, 'testdata/audit/success.txt')
|
||||
),
|
||||
status: 0,
|
||||
run: (): void => {
|
||||
return
|
||||
run: (): Promise<void> => {
|
||||
return Promise.resolve(void 0)
|
||||
},
|
||||
foundVulnerability: (): boolean => {
|
||||
return false
|
||||
@@ -60,8 +60,8 @@ describe('run', () => {
|
||||
path.join(__dirname, 'testdata/audit/error.txt')
|
||||
),
|
||||
status: 1,
|
||||
run: (): void => {
|
||||
return
|
||||
run: (): Promise<void> => {
|
||||
return Promise.resolve(void 0)
|
||||
},
|
||||
foundVulnerability: (): boolean => {
|
||||
return true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "npm-audit-action",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"private": true,
|
||||
"description": "GitHub Action to run `npm audit`",
|
||||
"main": "lib/main.js",
|
||||
|
||||
Reference in New Issue
Block a user