diff --git a/.travis.yml b/.travis.yml index b8058c9..687b89e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,14 @@ node_js: install: npm install -script: echo "Running tests against $(node -v)..." -script: npm run test +script: + - echo "Running tests against $(node -v)..." + - npm run test:integration + - npm run test:unit + +after_script: + - npm run coverage + - cat ./coverage/lcov.info | coveralls services: - mongodb \ No newline at end of file diff --git a/package.json b/package.json index ab092c8..df3e224 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "prepublishOnly": "npm run lint && npm run test && npm run docs", "test:integration": "isparta cover _mocha -- --opts test/integration/mocha.opts", "test:unit": "isparta cover _mocha -- --opts test/unit/mocha.opts", - "test": "npm run test:unit && npm run test:integration" + "coverage": "isparta cover _mocha -- --opts test/mocha.opts" }, "devDependencies": { "chai": "4.2.0", diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 0000000..460c469 --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1,5 @@ +./test/**/**/*.test.js +--recursive +--reporter spec +--timeout 2000 +--exit \ No newline at end of file