Skip to content

Instantly share code, notes, and snippets.

@bebraw
Created November 21, 2012 07:21
Show Gist options
  • Save bebraw/4123563 to your computer and use it in GitHub Desktop.
Save bebraw/4123563 to your computer and use it in GitHub Desktop.
Mocha vs. suite.js
// https://github.com/visionmedia/mocha
var assert = require("assert");
describe('Array', function(){
describe('#indexOf()', function(){
it('should return -1 when the value is not present', function(){
assert.equal(-1, [1,2,3].indexOf(5));
assert.equal(-1, [1,2,3].indexOf(0));
})
})
})
// https://github.com/bebraw/suite.js
var suite = require('./suite');
suite([1, 2, 3].indexOf, [
5, -1,
0, -1
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment