Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
traversing a returned array with a QUnit test
QUnit.test( "check individual results", function(assert){
for (x = fizzbuzz.start; x <= fizzbuzz.finish; x++) {
assert.ok(
(results[x] == x) ||
(results[x] == 'fizz') ||
(results[x] == 'buzz') ||
(results[x] == 'fizzbuzz') , "We expect results[x] is equal to x, 'fizz', 'buzz', or 'fizzbuzz.'");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment