Enabled ES6 support and added a test case in test.js