Skip to content

Instantly share code, notes, and snippets.

@plato-cambrian
Created October 3, 2014 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plato-cambrian/ca76cc268d4c8ec00f79 to your computer and use it in GitHub Desktop.
Save plato-cambrian/ca76cc268d4c8ec00f79 to your computer and use it in GitHub Desktop.
// npm install -g jasmine-node
// jasmine-node jasmineLoopSpec.js
// output: https://gist.github.com/plato-cambrian/f7cb3efb7fd130502eac
var coords = [{x:0, y: 0}];
describe('coords', function(){
it('coords[0] matches every x in width and y in height', function(){
var i = 0;
for(var x = 0; x < width; ++x) {
for(var y = 0; y < height; ++y) {
expect(coords[i].x).toBe(x);
expect(coords[i].y).toBe(y);
++i;
}
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment