nathanboktae / mocha-phantomjs

:coffee: :ghost: Run client-side mocha tests in the command line through phantomjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support babel!

janryWang opened this issue · comments

commented

For example:

mocha-phantomjs test/mocha-runner.html --compilers js:babel-core/register --recursive

mocha-phantomjs runs in the browser, not Node.js, that is not possible how you have it.

It's also not possible to do this generically, nor should it. The biggest difference between karma and mocha-phantomjs is that it gives you full control over your test runner HTML. Whatever works by going to your tests in a browser using Mocha will work with mocha-phantomjs (barring phantomjs issues, which there are quite a bit, less and less with phantomjs 2). So IIRC babel can work in the browser, so get that working, and it's working in mocha-phantomjs too.