Is there a way to make the setUp and tearDown methods on the ribbon?
I am using tape for testing in JavaScript, but in some cases I want to set some config variables available in all tests in the file. Something like the setUp and tearDown methods available in PhpUnit. These methods will run before and after each test in the file, respectively.
eg:
test("setUp", function(t){
var person = {name: 'Jose', programmer: true};
});
test("Name isn't undefined", function(){
t.notEqual(person.name, undefined);
});
test("Is a programmer", function(t){
t.ok(person.programmer);
});
test("tearDown", function(){
//Do something else
});
+3
source to share