Add test and coverage sections

remotes/origin/1117-camshaft-update
Daniel García Aubert 5 years ago
parent 8523f835dc
commit d3f0c52474

@ -53,6 +53,18 @@ $ node app.js <env>
Where `<env>` is the name of a configuration file under `./config/environments/`.
### Test
```shell
$ npm test
```
### Coverage
```shell
$ npm run cover
```
## Documentation
You can find an overview, guides, full reference, and support in [`CARTO's developer center`](https://carto.com/developers/maps-api/). The [docs directory](https://github.com/CartoDB/Windshaft-cartodb/tree/master/docs) contains different documentation resources, from higher level to more detailed ones.

@ -85,7 +85,7 @@
"test": "NODE_ENV=test mocha -t 5000 --exit --recursive test/acceptance test/integration test/unit",
"posttest": "npm run test:teardown",
"test:teardown": "NODE_ENV=test node test teardown",
"test:coverage": "npm run test:setup && nyc --reporter=lcov mocha -t 5000 --exit --recursive test/acceptance test/integration test/unit && npm run test:teardown",
"cover": "npm run test:setup && nyc --reporter=lcov mocha -t 5000 --exit --recursive test/acceptance test/integration test/unit && npm run test:teardown",
"pretest:ci": "cp config/environments/test.js.example config/environments/test.js",
"test:ci": "docker run -e \"NODEJS_VERSION=$NODE_VERSION\" -v `pwd`:/srv $DOCKER_IMAGE bash docker/scripts/test-setup.sh && docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v",
"docker:bash": "docker run -it -v `pwd`:/srv $DOCKER_IMAGE bash"

Loading…
Cancel
Save