Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

I'm having trouble getting Jasmine to run tests #30

Open
mr-mcox opened this issue Oct 25, 2016 · 1 comment
Open

I'm having trouble getting Jasmine to run tests #30

mr-mcox opened this issue Oct 25, 2016 · 1 comment

Comments

@mr-mcox
Copy link

mr-mcox commented Oct 25, 2016

From my notes, Jasmine is the test runner for the javascript tests. The command
bundle exec rake jasmine
results in:

rake aborted!
Don't know how to build task 'jasmine' (see --tasks)

I'm not sure if this is a documentation gap and/or other gems ought to be installed, rake scripts written, etc to enable the test running as indicated by http://jasmine.github.io/pages/getting_started.html

@wbushey
Copy link
Member

wbushey commented Oct 28, 2016

Capturing a couple of things @mr-mcox and I talked about in person:

  • That particular rake error is probably caused by our Rakefile not including some jasmine file.
  • There is a rake spec:javascript from the jasmine-rails gem that does appear to run Jasmine tests via PhantomJS. That rake task executes, but it does not actually run any tests :(
  • I recall earlier this year I was able to run javascript specs from the command line somehow (can't recall how). I got a ton of syntax/runtime errors, which I attributed to a mix of test framework expectations and existing JS having some syntax errors when run in strict mode. Since the tests can be run via rails s, I decided to go down the route of converting the JS to be React based, instead of trying to fix the existing JS so it could run/pass command line testing.
  • While we're OK for now not being able to run the javascript specs from the command line, we definitely have a long term goal of being able to run these specs from the command line.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants