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

4 comments
Comment actions Permalink

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)

0
Comment actions Permalink

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:

Cannot read [
/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....
0
Comment actions Permalink

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).

0
Comment actions Permalink

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?

0

Please sign in to leave a comment.