migrated tests to mocha