Improve unit-test execution

parent f177bd09
Pipeline #1700 passed with stages
in 2 minutes and 11 seconds
......@@ -12,9 +12,8 @@ unit tests:
- cd $BASE_PATH
- rm -rf node_modules/
- npm install
- npm install nodeunit
- cp config.json.default config.json
- ./node_modules/nodeunit/bin/nodeunit tests/run.js
- npm test
deploy preprod:
variables:
......@@ -41,7 +40,7 @@ deploy prod:
- rsync -ruvC ./ $BASE_PATH
- cd $BASE_PATH
- rm -rf node_modules/
- npm install
- npm install --production
- cp config.json.default config.json
- sudo /usr/bin/pm2 restart slogan
- sudo /usr/bin/pm2 show slogan
......
......@@ -18,12 +18,6 @@ cp config.json.default config.json
npm install
```
Testing require further dependencies:
```sh
npm install -g nodeunit
```
## Run
We're suggesting the use of pm2 to manage the service
......
{
"name": "generateur-slogans",
"version": "1.0.0",
"description": "Ce projet est le générateur de slogan et d'image utilisé par LQDN pour la campagne de dons 2017-2018.",
"description": "This project is the slogan generator used by LQDN for the donation compaign of years 2017-2018.",
"scripts": {
"test": "nodeunit ./tests/run.js",
"test": "./node_modules/nodeunit/bin/nodeunit tests/run.js",
"start": "./srv.js"
},
"repository": {
......@@ -15,5 +15,8 @@
"canvas": "2.0.0-alpha.5",
"express": "^4.16.1",
"pug": "^2.0.0-rc.4"
},
"devDependencies": {
"nodeunit": "^0.11.2"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment