moved to mocha test framework to support both browser and server