Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit f53df1c

Browse files
updated testing setup to use nyc cli for testing and coverage in CI
1 parent b16aecb commit f53df1c

File tree

5 files changed

+2347
-15
lines changed

5 files changed

+2347
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ lib-cov
1212

1313
# Coverage directory used by tools like istanbul
1414
coverage
15+
.nyc_output
1516

1617
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
1718
.grunt

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ jobs:
2020
script:
2121
- docker build -t humanconnection/api-feathers:alpha .
2222
- script:
23-
- cp ./config/local.example.json ./config/local.json
2423
- yarn install --frozen-lockfile --non-interactive
2524
- yarn add codacy-coverage
26-
- rm -Rf tmp
27-
- yarn eslint
28-
- NODE_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha -- test/ --timeout=10000 --exit
25+
- yarn global add nyc
26+
- yarn test:coverage --silent
2927
- cat ./coverage/lcov.info | codacy-coverage
30-
- rm ./config/local.json
3128

3229
after_success:
3330
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ Getting up and running is as easy as 1, 2, 3, 4 ... 5.
6161
# start mongodb, feathers and seed database
6262
$ yarn dev
6363
$ yarn dev:win if you're on windows
64+
6465
# start mongodb, feathers without seeding the database
6566
$ yarn dev:noseed
67+
6668
# start mongodb, feathers for production
6769
$ yarn start
6870
```
@@ -103,10 +105,9 @@ The seeder configuration has two properties:
103105
104106
## Testing
105107
106-
Simply run `yarn test` and all your tests in the `test/` directory will be run.
108+
First you will need to install the `nyc` CLI by running `yarn global add nyc` before you run the tests for the first time.
107109
108-
> **Note:**
109-
> *At the moment there are some issues with linting while testing, but you can run the tests also with mocha run*
110+
Then simply run `yarn test` and all your tests in the `test/` directory will be run.
110111
111112
## Scaffolding
112113

0 commit comments

Comments
 (0)