I have a jquery widget called tsColor with a colorSpecifiedColumns function. As described in my post title, I was wondering if there was a test cases function in qunit to avoir re writing the same test again and again with just a different value.
For example a thing like :
//case value =1
//case value =2
//case value =3
//...
test('color the first 3 columns', function () {
// Arrange
// Act
$("#container").tsColor("colorSpecifiedColumns", value);
// Assert
equal($(".colored").length, value, "number of colored columns equals to value");
});
I didn't quite get what you're looking for, but it might be a pattern similar to this?