Add "pretest" and "posttest" scripts

This commit is contained in:
Eric Cornelissen 2018-09-11 13:32:16 +03:00
parent 1d57dea52c
commit 046c5e8b45
2 changed files with 3 additions and 5 deletions

View File

@ -17,12 +17,8 @@ jobs:
- name: "Test package"
language: node_js
node_js: 8
before_script:
- npm run prepublishOnly
script:
- npm run test
after_script:
- npm run postpublish
- stage: deploy
name: "NPM Package"

View File

@ -27,6 +27,8 @@
"svglint": "svglint icons/* --ci",
"prepublishOnly": "node scripts/prepublish.js",
"postpublish": "rm icons/*.js index.js",
"test": "jest"
"test": "jest",
"pretest": "npm run prepublishOnly",
"posttest": "npm run postpublish"
}
}