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

How can ibrik be used with mocha? #11

Open
thom-nic opened this issue Dec 26, 2013 · 24 comments
Open

How can ibrik be used with mocha? #11

thom-nic opened this issue Dec 26, 2013 · 24 comments

Comments

@thom-nic
Copy link

We have a suite of Mocha tests and I'm looking for a coverage tool to determine how thorough our tests are. Any idea how Mocha can integrate with ibrik? Thanks.

@evantill
Copy link

evantill commented Feb 5, 2014

👍 same question here

@AdrienLemaire
Copy link

Same problem here, trying to add coffeescript coverage to RTD using Mocha

@dashed
Copy link

dashed commented Apr 4, 2014

Would like to know about this as well...

@jescalan
Copy link

+1, would be really excellent. I tried running ibrik cover _mocha and it did run the tests, but exited at the end without collecting any coverage information.

Would love to get a quick response here @Constellation

@johngeorgewright
Copy link

👍 I'm also looking for an answer to this.

@shaunc
Copy link

shaunc commented May 27, 2014

+1 ... tried (modifying instructions for use of mocha w/ istanbul):

ibrik cover /usr/local/bin/_mocha -- --bail -u bdd --compilers coffee:coffee-script,litcoffee:coffee-script/register

... and I get:

No coverage information was collected, exit without writing coverage information.

@volkhin
Copy link

volkhin commented Jun 22, 2014

Any update on this?

@drabiter
Copy link

+1

The test run but no coverage collected.
ibrik cover ./node_modules/mocha/bin/_mocha -- --compilers coffee:coffee-script/register --reporter spec --recursive test/

@lavelle
Copy link

lavelle commented Dec 3, 2014

+1

1 similar comment
@duereg
Copy link

duereg commented Dec 9, 2014

+1

@rimunroe
Copy link

This would be extremely useful.

@justin-lau
Copy link

+1

@duereg
Copy link

duereg commented Dec 13, 2014

A little off topic, but I wrote this gulp plugin using the coffee instrumentor from this project to allow for coffee code coverage under mocha:

gulp-coffee-istanbul.

Doesn't solve this issue but at least gives a workaround.

@rimunroe
Copy link

Unfortunately, gulp-coffee-istanbul only works with code which is written for the CoffeeScriptRedux compiler, and not actual CoffeeScript. Sadly, CoffeeScriptRedux is largely abandoned and is lagging far behind CoffeeScript in feature support.

@Constellation
Copy link
Owner

I'll investigate it at weekend.

@duereg
Copy link

duereg commented Dec 16, 2014

@rimunroe I just fixed this. gulp-coffee-istanbul now uses the coffee-script compiler, not redux.

@justin-lau
Copy link

I'm using @duereg's fork of istanbul instead of gulp-coffee-istanbul:

./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register test/*.coffee

@thom-nic
Copy link
Author

@justin-lau @duereg is there an open PR to have those changes to istanbul merged upstream?

@duereg
Copy link

duereg commented Dec 17, 2014

@thom-nic @justin-lau There is an open pull request on istanbul that I used as the basis for my fork. But it's been hanging around since March with no ETA on a merge.

@gilligan
Copy link

@justin-lau @duereg sorry for reviving this - i am trying to figure out how to get this istanbul fork to work since this still hasn't been merge upstream. When I try the command you listed @justin-lau I still get "No coverage information output was collected, exit without coverage information"

Can either of you perhaps help me out with this ? :) thanks.

@duereg
Copy link

duereg commented Mar 18, 2015

@gilligan You figured this out, correct?

@gilligan
Copy link

@duereg yep thanks ;-)

@jwalton
Copy link

jwalton commented May 6, 2015

Just wanted to drop a note mentioning that coffee-coverage has support for Istanbul instrumentation now, and it was designed from the ground up with mocha in mind.

@59naga
Copy link

59naga commented Jun 6, 2015

Got the answer of ibrik:

$ ibrik cover _mocha -- test/*.coffee

Demo:
https://travis-ci.org/59naga/jasminetea/builds/65687751

Note:
test/**" isn't calculated. Can use --default-excludes option if want include files at test/**

59naga added a commit to 59naga/ibrik that referenced this issue Jun 6, 2015
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