index.js

fix syntax error
finish test cases