Add test script written in mocha, for #2