Shared behaviour for mocha test environment

#19