Adding Javascript Tests #253

jasper-lyons opened this Issue Apr 29, 2016 · 3 comments


None yet

2 participants


Some questions to answer regarding js tests:

  • How do we feel about adding them?
  • Which test frame work should be used and in which way?
  • What about adding dependencies (development) to the project?

My initial thoughts were:

  • I want tests so that I can check to see that the charts I'm implementing work without using external local dependencies / depending on my fork of this project for my work.
  • Using Mocha or Jasmine seem like a sensible way to go (my preference is Mocha)
  • This would introduce a dependency on nodejs (unless we ran tests in browser)
ankane commented May 10, 2016

Hi Jasper, I'm happy to consider adding tests. I'm curious to see what you had in mind. They should probably be added to rather than here. I haven't done much JavaScript testing, but Mocha looks like a fine option. A node dev dependency should be fine for chartkick.js.


Hey Andrew, sounds good!

I'll throw together a pull request on with some basic outline tests + docs.

I'm going to assume that the js in the gem is updated from ? Is this done automatically or manually?

ankane commented May 11, 2016

Correct. It's done manually on new releases of chartkick.js, and occasionally in between releases when it'll benefit someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment