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

Mocha programmatically and Compiler #1220

Closed
thibaut-sticky opened this issue May 20, 2014 · 2 comments
Closed

Mocha programmatically and Compiler #1220

thibaut-sticky opened this issue May 20, 2014 · 2 comments
Labels
status: waiting for author waiting on response from OP - more information needed

Comments

@thibaut-sticky
Copy link

Hi,

Currently, I'm writting Selenium test using this grunt module. This module use Mocha in a programmatic way. Problem is my tests are written in coffeescript.
Normally I should use --compilers coffee:coffee-script/register to compile them. But according to this page compiler is not yet understood.

I found a workaround using grunt-contrib-coffee to compile my code to js. But, when my test failed because of exception, I have a stacktrace on the .js files. So I have to open the js file, look the line, and then open the .coffee file. It's not really a nice workflow.

Can you tell me if I miss something about the usage of Mocha in Programmatic way?

@boneskull
Copy link
Contributor

@thibaut-sticky I think those docs are out of date. See #1298.

I think you need a source map to associate lines in your .js file with lines in your .coffee file? I'm not really sure. I think this is beyond Mocha's scope.

Would need to see code to be able to help more.

My only other recommendation would be to just use JS because you won't have these problems. 😄

@thibaut-sticky
Copy link
Author

Finally, I found a workaround just adding require('coffee-script/register') in my Gruntfile. It works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for author waiting on response from OP - more information needed
Projects
None yet
Development

No branches or pull requests

2 participants