Question

I'm trying to run unit tests written in QUnit using jsTestDriver. I'm getting "ReferenceError: equal is not defined". Checking the source code shows that the adapter (Qunit->jsTestDriver) QUnitAdapter.js supports the equals method:

window.equals = function(a, b, msg) {...}

While Qunit does not support equals (renamed to equal last year).

Am I missing something here?

p.s. I'm using jsTestDriver which is integrated into WebStorm 4.

Was it helpful?

Solution

I assume that you are using the QUnitAdapter from the JsTestDriver website. Currently, the adapter on that site only supports a small subset of what QUnit is capable of, so you should use the far more up-to-date and mature QUnitAdapter found here. I wrote a post that shows how to integrate QUnit, Requirejs, and code coverage with JSTD: js-test-driver+qunit+coverage+requirejs. Hope it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top