Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting exit code 0 regardless of the test results #111

Closed
kobik opened this issue Jan 11, 2017 · 6 comments
Closed

Getting exit code 0 regardless of the test results #111

kobik opened this issue Jan 11, 2017 · 6 comments

Comments

@kobik
Copy link

kobik commented Jan 11, 2017

Hi,

When running tests with v2.0.0, i'm always getting exit code 0, regardless of if the tests have failed or not.
I've verified that in v1.5.4 when the tests failed, the exit code was 2.

@adamgruber
Copy link
Owner

Example code/usage?

@kobik
Copy link
Author

kobik commented Jan 11, 2017

Here you go
Test

var should = require('should');

it('test mochawesome', function () {
   true.should.equal(false) 
});

With mochawesome 2.0.0

bash-3.2$ node_modules/mocha/bin/mocha test/mytest.js --reporter mochawesome; echo $?
  1) test mochawesome

  0 passing (14ms)
  1 failing

  1)  test mochawesome:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Assertion.fail (node_modules/should/cjs/should.js:231:17)
      at Assertion.value (node_modules/should/cjs/should.js:305:19)
      at Context.<anonymous> (test/mytest.js:4:16)
[mochawesome] Report JSON saved to mochawesome-reports/mochawesome.json

[mochawesome] Report HTML saved to mochawesome-reports/mochawesome.html
0
bash-3.2$

Without mochawesome

bash-3.2$ node_modules/mocha/bin/mocha test/mytest.js ; echo $?
  1) test mochawesome

  0 passing (14ms)
  1 failing

  1)  test mochawesome:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Assertion.fail (node_modules/should/cjs/should.js:231:17)
      at Assertion.value (node_modules/should/cjs/should.js:305:19)
      at Context.<anonymous> (test/mytest.js:4:16)
1
bash-3.2$

@bonesoul
Copy link

having the exact same problem.

additionaly generated report file is not rendering with chrome / firefox.

@bonesoul
Copy link

still same with 2.0.1

@adamgruber
Copy link
Owner

Still looking into it. 2.0.1 was to fix some other issues.

@adamgruber
Copy link
Owner

Should be fixed in 2.0.2

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

No branches or pull requests

3 participants