fix build
migrate test to amd
fix jshint warning
fix build