I have the following set up in QUnit:
/* Dozen or so previous tests here */
test("Test some markup generation", function () {
$('#qunit-fixture').plugin(); // jQuery plugin: Generates a table
var rows = $('#qunit-fixture table tbody tr');
count = rows.length; // Count the rows
console.log(count);
equal(count, "96", "Expect the number of rows to be 96");
});
When it runs, or when I refresh the browser it alternately fails this test showing count = 0, or passes this and fails all the previous tests. There are no global variables defined outside the tests. If I set count to 96 by hand everything passes fine, or if I remove this test, or all the previous tests, everything also passes. I am wondering if anyone has run into this behavior? I've used QUnit quite a bit and have not encountered this before.
count
, and check for yourself if there can be a clash: code.jquery.com/jquery-1.7.1.js – Crumpet