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

Add option for compilers flag or explicitly state how to specify this in the docs #84

Closed
jxm262 opened this issue Mar 4, 2015 · 5 comments

Comments

@jxm262
Copy link

jxm262 commented Mar 4, 2015

Sorry if this is the wrong place to ask this, but can we add something for the mocha --compiler flag? I tried looking through the source and couldn't easily figure out how to explicitly set this option. However, when I just do add a require('mycompiler') at the top of my gulpfile, it somehow magically runs during the mocha task. I see the readme explains how to do this for coffeescript, but I have my own compiler which I use for jsx to js transormations (reactjs).

For example, running from the command line mocha --compilers .:my_compiler.js test/**/*.js

@hsunami
Copy link

hsunami commented Mar 10, 2015

+1

@akhomchenko
Copy link

Mocha doesn't support programmatic set of compiler, so you can do something like babel/register or coffescript/register

@eddiemoore
Copy link

👍

@kevva
Copy link
Contributor

kevva commented May 22, 2015

Just require it manually in your gulpfile.js. Mocha doesn't have this as a programmatic option because it's super easy to just do it yourself.

@kevva kevva closed this as completed May 22, 2015
@kunalkapadia
Copy link

You can pass compilers options as per this stackoverflow answer.

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

6 participants