make jshint pass
change test to mocha test
add define