QUnit Adapter 1.0.2
August 30th, 2009
A new version of the JS Test Driver QUnit Adapter is available.
Version 1.0.2 fixes a small bug where a module lifecycle object without Setup or Teardown methods would cause a test to error. For example:
module('Lifecycle', {}); test('', function() { expect(1); ok(true, 'tests still run successfully even if Setup and Teardown are undefined'); });
Would give the error Lifecycle.test error (1.00 ms): Result of expression 'l.setUp' [undefined] is not a function..
This is now fixed so the test behaves as if no lifecycle was defined.
You can get the new 1.0.2 verison of the QUnit Adapter from Google Code.
October 20th, 2009 at 1:55 am
Hi Karl:
I have tried using your QUnit Adaptor 1.0.2, and am having a lot of difficulties trying to get it working.
I have followed the instructions on the website and included the two js files into my JSTestDriver config file. But the problem is that it is passing the tests that are supposed to fail (e.g. equals(true, false, “should fail”);). I tested the same code using the prototype test thingy, and the tests worked properly.
In my project, I have included qunit.js, jquery-1.3.2.min.js, Asserts.js (removed it and still didn’t work), equiv.js, QUnitAdapter.js, and my tests and source files.
Appreciate any help from you.
Thanks.
Chris.
October 27th, 2009 at 8:58 am
Hi Chris,
You don’t need to include qunit.js, or Asserts.js as the QUnitAdapter provides the qunit assertions and JS Test Driver provides its own assertions.
And you only need to include jquery if your source or test files explicitly use it.
I’m guessing the problem is that you have included qunit.js and it is clashing with the QUnitAdapter.