Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

Travis.ci false positive result ? #106

Open
jaumard opened this issue Jan 10, 2016 · 8 comments
Open

Travis.ci false positive result ? #106

jaumard opened this issue Jan 10, 2016 · 8 comments

Comments

@jaumard
Copy link

jaumard commented Jan 10, 2016

I use this command to run tests babel-node node_modules/.bin/isparta cover _mocha and here the output :

npm test

> babel-node node_modules/.bin/isparta cover _mocha

  module:app
    Should create app from archetype
      1) "before all" hook

  0 passing 
  1 failing

  1) module:app Should create app from archetype "before all" hook:
     Uncaught Error: ENOENT: no such file or directory, access '/private/var/folders/w8/79t7n_v96kx42lrn_7sm8k2c0000gn/T/df978e3a519fe5db4ca90e6080d6f0c62e0a8ed8/node_modules/mymodule'
      at Error (native)
      at Object.fs.accessSync (fs.js:203:11)
      at /src/app/steps/writing.js:9:2043
      at AppGenerator.install.runInstall (/node_modules/yeoman-generator/lib/actions/install.js:39:5)
      at AppGenerator.install [as npmInstall] (/node_modules/yeoman-generator/lib/actions/install.js:160:15)
      at AppGenerator.serverDependentApi (/src/app/steps/writing.js:9:1668)
      at /node_modules/yeoman-generator/lib/base.js:430:16
      at processImmediate [as _immediateCallback] (timers.js:374:17)



================================================================================
Writing coverage object [/coverage/coverage.json]
Writing coverage reports at [/coverage]
================================================================================

=============================== Coverage summary ===============================
Statements   : 91.37% ( 773/846 ), 28 ignored
Branches     : 85.21% ( 242/284 ), 82 ignored
Functions    : 91.71% ( 166/181 )
Lines        : 77.61% ( 253/326 )
================================================================================

But on travis.ci build is marked as passed even tests are not. Any way to don't run coverage if mocha tests are failing ? Or do I need to change something in order to travis.ci to detect tests are failed.

@nathanmarks
Copy link

I am having the same issue. Is this a regression from #58 ?

@emmenko
Copy link

emmenko commented Feb 29, 2016

I can confirm I have the same problem, but the last commit is dated Nov 14 2015. Could it be one of the dependencies that is causing this problem.

@nathanmarks
Copy link

@emmenko Not sure, I'm going to have to investigate myself as @douglasduteil doesn't seem to have been active lately.

@emmenko
Copy link

emmenko commented Mar 6, 2016

Awesome, thanks!! 👍

@nathanmarks
Copy link

@emmenko This fixes it for me: https://github.com/nathanmarks/isparta/tree/remove-process-exit-0

The process.exit(0) was stopping exit codes from process.on('exit') handlers in the test harness from passing through properly.

@pesama
Copy link

pesama commented May 10, 2016

@douglasduteil Any planned date for solve this on the main repo, so we could npm-install it fixed?

Thanks.

@nathanmarks
Copy link

@pritok I've moved on to the alpha version of istanbul which works better than this lib anyways. Check out my setup here: https://github.com/callemall/material-ui

@pesama
Copy link

pesama commented May 10, 2016

Thanks @nathanmarks !! I was trying to fix a false test error with Travis when I run coverage (on local machine works like a charm). The error is still there though, so maybe I've messed it up somewhere else. Anyways thank you for your help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants