Skip to content

Commit

Permalink
Merge pull request ccxt#3202 from compositor/fetch
Browse files Browse the repository at this point in the history
Ensure a build fails if mocha tests fail
  • Loading branch information
kroitor authored Jun 21, 2018
2 parents 6ee1fc9 + b7a28da commit 4e5ca71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions js/test/base/test.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ describe ('ccxt base code', () => {
/* ------------------------------------------------------------------------ */

require ('./functions/test.generic')
require ('./functions/test.number')
require ('./functions/test.time')
require ('./functions/test.type')
require ('./functions/test.datetime')
// Some test files are transplitted into other languages and must be kept very simple so we put `it` call externally to them
// Some mocha reporters will swallow `assert` failures if they are outside of `it` clause so we must call `it`
it ('decimalToPrecision() works', () => {
require ('./functions/test.number')
})
it ('date&time functions work', () => {
require('./functions/test.datetime')
})

/* ------------------------------------------------------------------------ */

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test": "npm run build && node run-tests",
"fast-test": "node run-tests --js",
"test-base": "npm run test-js-base && npm run test-python-base && npm run test-php-base",
"test-js-base": "mocha --reporter spec js/test/base/test.base.js --reporter ololog/reporter",
"test-js-base": "mocha js/test/base/test.base.js --reporter ololog/reporter",
"test-python-base": "python python/test/test_decimal_to_precision.py",
"test-php-base": "php -f php/test/decimal_to_precision.php",
"export-exchanges": "node export-exchanges",
Expand Down

0 comments on commit 4e5ca71

Please sign in to comment.