Skip to content

Instantly share code, notes, and snippets.

@brianswisher
Last active December 8, 2015 17:23
Show Gist options
  • Save brianswisher/9b37607d4f266b79e7e0 to your computer and use it in GitHub Desktop.
Save brianswisher/9b37607d4f266b79e7e0 to your computer and use it in GitHub Desktop.
Test template
((assert, it)=>{
function func(){
return true;
}
it("<better decription here>", function() {
return assert(
func(),
true
);
});
})(
(value, expected)=>{//assert
return value === expected;
},
(describe, test)=>{//it
var result = test();
if (result) {
console.info(`✓ ${describe}`);
} else {
console.error(`:( ${describe}`);
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment