Skip to content

Commit

Permalink
add --exit parameter to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
biggora committed May 4, 2018
1 parent 5554856 commit 1d75b68
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ check:
@jshint ./lib

test-units:
@NODE_ENV=test $(MOCHA) test/units -r should -R $(MOCHA_REPORTER)
@NODE_ENV=test $(MOCHA) test/units -r should -R $(MOCHA_REPORTER) --exit

test-models:
@NODE_ENV=test $(MOCHA) test/models -r should -R $(MOCHA_REPORTER)
@NODE_ENV=test $(MOCHA) test/models -r should -R $(MOCHA_REPORTER) --exit

test-watch:
@NODE_ENV=test $(MOCHA_WATCH)
Expand All @@ -22,31 +22,31 @@ test-cov: clear
@NODE_ENV=test $(MOCHA_COV)

test-mysql:
@CAMINTE_DRIVER=mysql $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER)
@CAMINTE_DRIVER=mysql $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER) --exit

test-sqlite:
@CAMINTE_DRIVER=sqlite $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER)
@CAMINTE_DRIVER=sqlite $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER) --exit

test-postgres:
@CAMINTE_DRIVER=postgres $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER)
@CAMINTE_DRIVER=postgres $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER) --exit

test-redis:
@CAMINTE_DRIVER=redis $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER)
@CAMINTE_DRIVER=redis $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER) --exit

test-mongo:
@CAMINTE_DRIVER=mongo $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER)
@CAMINTE_DRIVER=mongo $(MOCHA) --timeout 3000 -r should -R $(MOCHA_REPORTER) --exit

test-tingo:
@CAMINTE_DRIVER=tingo $(MOCHA) --timeout 5000 -r should -R $(MOCHA_REPORTER)
@CAMINTE_DRIVER=tingo $(MOCHA) --timeout 5000 -r should -R $(MOCHA_REPORTER) --exit

test-rethinkdb:
@CAMINTE_DRIVER=rethinkdb $(MOCHA) --timeout 5000 -r should -R $(MOCHA_REPORTER)
@CAMINTE_DRIVER=rethinkdb $(MOCHA) --timeout 5000 -r should -R $(MOCHA_REPORTER) --exit

test-arango:
@CAMINTE_DRIVER=arango $(MOCHA) --timeout 5000 -r should -R $(MOCHA_REPORTER)
@CAMINTE_DRIVER=arango $(MOCHA) --timeout 5000 -r should -R $(MOCHA_REPORTER) --exit

test-neo4j:
@CAMINTE_DRIVER=neo4j $(MOCHA) --timeout 5000 -r should -R $(MOCHA_REPORTER)
@CAMINTE_DRIVER=neo4j $(MOCHA) --timeout 5000 -r should -R $(MOCHA_REPORTER) --exit

test: test-sqlite test-mysql test-mongo test-redis

Expand Down
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@
},
"main": "index.js",
"scripts": {
"test": "make test"
"test": "make test",
"test:mysql": "cross-env CAMINTE_DRIVER=mysql _mocha --timeout 3000 -r should -R spec --exit",
"test:sqlite": "cross-env CAMINTE_DRIVER=sqlite _mocha --timeout 3000 -r should -R spec --exit",
"test:postgres": "cross-env CAMINTE_DRIVER=postgres _mocha --timeout 3000 -r should -R spec --exit",
"test:redis": "cross-env CAMINTE_DRIVER=redis _mocha --timeout 3000 -r should -R spec --exit",
"test:mongo": "cross-env CAMINTE_DRIVER=mongo _mocha --timeout 3000 -r should -R spec --exit"
},
"engines": {
"node": ">=4",
Expand All @@ -111,11 +116,10 @@
"async": "^2.6.0",
"cassandra-driver": "^3.5.0",
"coffee-script": "^1.12.7",
"semicov": "^0.2.0",
"should": "^13.2.1",
"generic-pool": "^3.4.2",
"cradle": "^0.7.1",
"cross-env": "5.1.4",
"felix-couchdb": "^1.0.8",
"generic-pool": "^3.4.2",
"istanbul": "^0.4.5",
"jshint": "2.x",
"mocha": "^5.1.1",
Expand All @@ -128,6 +132,8 @@
"redis": "^2.8.0",
"rethinkdb": "^2.3.3",
"riak-js": "^1.1.0",
"semicov": "^0.2.0",
"should": "^13.2.1",
"sqlite3": "^4.0.0",
"underscore": "^1.9.0"
},
Expand Down

0 comments on commit 1d75b68

Please sign in to comment.