I\'m using mocha for javascript unit-testing now.
I have several test files, each file has a before and beforeEach, but they are exactly the s
before
beforeEach
In the root of the test folder, create a global test helper test/helper.js which has your before and beforeEach
test/helper.js
// globals global.assert = require('assert'); // setup before(); beforeEach(); // teardown after(); afterEach();