test: add hooks to test scripts
Now you can use before before_each after and after_each. Each of
the hooks will run in the context of the test file.
before This will run once before all the tests
before_each This will run before each of the test functions
after Will run once after all the test functions
after_each Will run after each one of the test functions
Multiple functions can be defined for each hook by calling the
respective function again.