Skip to content

Commit

Permalink
Coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvndre committed Nov 14, 2017
1 parent cbd3df0 commit 6b694e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ script:
- make test
after_script:
- make test-coveralls
# - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test-coverage: ## launch tests with coverage
@$(MAKE) -s build
@export PORT=0 && \
export NODE_ENV=test && \
$(BABEL_NODE) $(BABEL_ISTANBUL) cover $(MOCHA_) --report html --report lcovonly --report text --check-coverage -- --recursive --exit
$(BABEL_NODE) $(BABEL_ISTANBUL) cover $(MOCHA_) --report html --report text --check-coverage -- --recursive --exit

test-coveralls: ## launch tests with coverage and send to coveralls
@export PORT=0 && \
Expand Down
6 changes: 3 additions & 3 deletions src/helper/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Logger {
],
});

if (process.env.NODE_ENV === 'local') {
if (process.env.NODE_ENV === 'local' || process.env.NODE_ENV === 'test') {
this._logger.add(winston.transports.Console, {
level: 'info',
timestamp: () => (new Date().toISOString()),
Expand All @@ -21,13 +21,13 @@ class Logger {
}

info(message, meta) {
if (process.env.NODE_ENV === 'local') {
if (process.env.NODE_ENV === 'local' || process.env.NODE_ENV === 'test') {
this._logger.log('info', message, meta);
}
}

error(message, meta) {
if (process.env.NODE_ENV === 'local') {
if (process.env.NODE_ENV === 'local' || process.env.NODE_ENV === 'test') {
this._logger.log('error', message, meta);
}
}
Expand Down

0 comments on commit 6b694e5

Please sign in to comment.