Skip to content

Instantly share code, notes, and snippets.

@ramses-lopez
Created March 29, 2017 03:43
Show Gist options
  • Save ramses-lopez/c8c573579377f10bd9ff0ece3a139bba to your computer and use it in GitHub Desktop.
Save ramses-lopez/c8c573579377f10bd9ff0ece3a139bba to your computer and use it in GitHub Desktop.
tape js test
var test = require('tape');
var calc = {
add: function(x,y){
return x+y*2
}
}
test('adding two numbers', function (t) {
var r = calc.add(2,2, 'this should add 2+2 & return 4')
t.equal(r, 4);
t.end();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment