JsTestDriver + Jasmine + CoffeeScript ??
I have a Rails project with
- JsTestDriver setup and working
- jasmine and jasminerice gems installed
- tests and code in coffeescript
When I try to run the tests I always get the following error:
error loading file: /test//home/bkaplan/si/vimana-ui.dev/spec/javascripts/devices_spec.js.coffee:1: Uncaught SyntaxError: Unexpected token ILLEGAL
Clearly I'm missign something. Any help would be appreciated.
-barry
Please sign in to leave a comment.
Oops, did not notice the path to the file starts with /test. I will check on that first. (But Idea completion works for that location in the *.jstd file)
I changed the *.jstd file to include:
test:
- /home/bkaplan/si/vimana-ui.dev/spec/javascripts/devices_spec.js.coffee
Now I get a different error:
/home/bkaplan/si/vimana-ui.dev/config/home/bkaplan/si/vimana-ui.dev/spec/javascripts/devices_spec.js.coffee
] derived from /home/bkaplan/si/vimana-ui.dev/spec/javascripts/devices_spec.js.coffee
So it seems that jstd insists on adding things to the path. I'll check the docs some more....
The /test prefix is a decoy. The correct is being loaded but for some reason not being interpreted as a cofeescript (or anything for what I can tell).
Some progress. I can get JsTestDriver to run all the tests. But it does not handle coffeescript. All those files get syntax errors. I'm assuming this is because there nothing like the asset pipeline to compile the coffeescript. So, does anybody run coffeescript/jasminerice tests via JsTestDriver?