Skip to content

Commit

Permalink
refactor(test): add a npm run test in develpment mode -> run test-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff committed Apr 19, 2023
1 parent e54f352 commit 9ca1d5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions CODING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ Or you can download it manually, and then:
* then use the env var `CHROME` to tell itowns/mocha/puppeteer what Chrome app
it should use: `CHROME=/opt/google/chrome-beta/chrome npm run test-examples`

Then tests can be ran with four differents methods:
* `npm run test`: build and ran all tests in iTowns
* `npm run test-unit`: ran unit tests only
* `npm run test-functional`: ran functional testing with examples only, use
Then tests can be run with five differents methods:
* `npm run test`: build and run all tests in iTowns (the one used by github action)
* `npm run test-dev`: build in development mode and run all tests in iTowns (to get more messages)
* `npm run test-unit`: run unit tests only
* `npm run test-functional`: run functional testing with examples only, use
`npx mocha -t 30000 test/functional/bootstrap.js
test/functional/<test_case>.js` to run a single example
* `npm run test-with-coverage`: build and ran all tests in iTowns and generate a
* `npm run test-with-coverage`: build and run all tests in iTowns and generate a
report on the coverage of the tests


Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"doc": "jsdoc --readme docs/HOMEPAGE.md -c docs/config.json",
"doclint": "npm run doc -- -t templates/silent",
"test": "npm run lint -- --max-warnings=0 && npm run build && npm run test-with-coverage && npm run test-functional",
"test-dev": "npm run lint -- --max-warnings=0 && npm run build-dev && npm run test-with-coverage && npm run test-functional",
"test-unit": "npm run base-test-unit test/unit",
"test-functional": "mocha -t 60000 --require test/hooks_functional.js --recursive test/functional",
"test-with-coverage": "nyc -n src -r html cross-env npm run test-unit",
Expand Down

0 comments on commit 9ca1d5f

Please sign in to comment.