Unit testing JavaScript - Configuration file

I am trying to use an existing QUnit-based set of JavaScript unit tests in PyCharm. These work in a stand-alone browser. My goal is to be able to further develop/debug them in PyCharm.

Directions seem to indicate that I need to use the JSTestDriver plugin, even though my existing tests don't use JSTestDriver. I've gotten as far as including the JSTestDriver Plugin and setting up a JSTestDriver configuration file. I have also managed to download and run the greeter_sample_new contents. But now I am getting Uncaught ReferenceError, TypeError, and SyntaxError messages coming back from the captured Chrome browser. Those errors reference standard JavaScript libraries like backbone-min.js and bootstrap.min.js.

Evidently I don't have JSTestDriver configured sufficiently to run these tests or perhaps PyCharm expects my tests to use JSTestDriver style or perhaps I need to integrate the QUnit JS Test Driver adapter somehow? What am I missing? Below is my config file:

server: http://localhost:9876

  - public/javascripts/lib/*.js
  - public/javascripts/*.js

  - test/qunit/resources/*.js
  - test/qunit/*.js

  1. exclude:
  2. - uselessfile.js

- public/stylesheets/*.css

timeout: 90
1 comment
Hi Jonathan,

Checkout https://code.google.com/p/js-test-driver/wiki/QUnitAdapter for QUnit JsTestDriver adapter configuration details.
Make sure equiv.js and QUnitAdapter.js files are listed in "load:" section of the configuration file.

Can you run QUnit tests using JsTestDriver in console successfully?

Please sign in to leave a comment.