Move to mocha, fix undefined issue
merge