nathanboktae / mocha-casperjs

Write CasperJS tests using Mocha
MIT License
120 stars 30 forks source link

Hide Stacktrace #31

Closed adampatarino closed 9 years ago

adampatarino commented 10 years ago

I'm trying to remove the stacktrace from the console / reporter for my tests. In chai they reference doing this:

chai.config.includeStack = false;

However, this does not change the reporting behavior when a test is run. I'd like the reason why the test failed to still be present, just remove the stacktrace.

Ideas?

nathanboktae commented 10 years ago

Actually it is

chai.Assertion.includeStack = false
adampatarino commented 10 years ago

So do I put that in my test file?

chai.Assertion.includeStack = false;

describe('foo', function() {
  it('bar', function() {
    casper.click('button');
    expect(this).to.equal(that, "sorry this does not equal that");
    });
});

Does it change based on reporter? I'm using tap reporter.

adampatarino commented 10 years ago

Doesn't work on list either. Am I just missing where to declare includeStack = false?

nathanboktae commented 9 years ago

Oh my comment was for chai 1.x and yours is 2.x... not sure if you solved this, but it's a chai configuration either way and not a mocha-casperjs issue.