diff --git a/lib/js/Gruntfile.js b/lib/js/Gruntfile.js
index e678cd5..577a393 100644
--- a/lib/js/Gruntfile.js
+++ b/lib/js/Gruntfile.js
@@ -51,7 +51,10 @@
       },
       ThriftGenDeepConstructor: {
         command: '../../compiler/cpp/thrift -gen js -o test ../../test/JsDeepConstructorTest.thrift'
-      }
+      },
+      ThriftGenES6: {
+        command: '../../compiler/cpp/thrift -gen js -gen js:es6 -o test ../../test/ThriftTest.thrift'
+      },
     },
     external_daemon: {
       ThriftTestServer: {
@@ -133,6 +136,13 @@
             'http://localhost:8088/test-deep-constructor.html'
           ]
         }
+      },
+      ThriftWSES6: {
+        options: {
+          urls: [
+            'http://localhost:8088/test-es6.html'
+          ]
+        }
       }
     },
     jshint: {
@@ -162,13 +172,15 @@
                               'shell:ThriftGenDeepConstructor', 'qunit:ThriftDeepConstructor',
                               'qunit:ThriftJS', 'qunit:ThriftJS_TLS',
                               'qunit:ThriftWS',
-                              'shell:ThriftGenJQ', 'qunit:ThriftJSJQ', 'qunit:ThriftJSJQ_TLS'
+                              'shell:ThriftGenJQ', 'qunit:ThriftJSJQ', 'qunit:ThriftJSJQ_TLS',
+                              'shell:ThriftGenES6', 'qunit:ThriftWSES6'
                              ]);
   grunt.registerTask('default', ['jshint', 'shell:InstallThriftJS', 'shell:InstallThriftNodeJSDep', 'shell:ThriftGen',
                                  'external_daemon:ThriftTestServer', 'external_daemon:ThriftTestServer_TLS',
                                  'qunit:ThriftJS', 'qunit:ThriftJS_TLS',
                                  'qunit:ThriftWS',
                                  'shell:ThriftGenJQ', 'qunit:ThriftJSJQ', 'qunit:ThriftJSJQ_TLS',
+                                 'shell:ThriftGenES6', 'qunit:ThriftWSES6',
                                  'concat', 'uglify', 'jsdoc'
                                 ]);
 };
diff --git a/lib/js/test/build.xml b/lib/js/test/build.xml
index a905fde..d10a2d1 100755
--- a/lib/js/test/build.xml
+++ b/lib/js/test/build.xml
@@ -96,6 +96,7 @@
     <get src="http://code.jquery.com/jquery-1.11.3.min.js" dest="${build}/js/lib/jquery.js" usetimestamp="true"/>
     <get src="http://code.jquery.com/qunit/qunit-1.18.0.js" dest="${build}/js/lib/qunit.js" usetimestamp="true"/>
     <get src="http://code.jquery.com/qunit/qunit-1.18.0.css" dest="${build}/js/lib/qunit.css" usetimestamp="true"/>
+    <get src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js" dest="${build}/js/lib/es6-promise.js" usetimestamp="true"/>
   </target>
 
   <target name="compile" description="compile the test suite" depends="init, generate, resolve">
diff --git a/lib/js/test/test-async.js b/lib/js/test/test-async.js
index b56f2a2..b4e9854 100644
--- a/lib/js/test/test-async.js
+++ b/lib/js/test/test-async.js
@@ -345,4 +345,12 @@
     });
   });
 
+module('Oneway');
 
+  asyncTest('testOneway', function() {
+    expect(1);
+    client.testOneway(1, function(result) {
+      equal(result, undefined);
+      QUnit.start();
+    });
+  });
\ No newline at end of file
diff --git a/lib/js/test/test-es6.html b/lib/js/test/test-es6.html
new file mode 100644
index 0000000..92d0738
--- /dev/null
+++ b/lib/js/test/test-es6.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>Thrift Javascript Bindings: Unit Test</title>
+
+  <script src="build/js/thrift.js"         type="text/javascript" charset="utf-8"></script>
+  <script src="gen-js/ThriftTest_types.js" type="text/javascript" charset="utf-8"></script>
+  <script src="gen-js/ThriftTest.js"       type="text/javascript" charset="utf-8"></script>
+
+  <!-- ES6 Promise Polyfill -->
+  <script type="text/javascript" src="build/js/lib/es6-promise.js" charset="utf-8"></script>
+
+  <!-- jQuery -->
+  <script type="text/javascript" src="build/js/lib/jquery.js" charset="utf-8"></script>
+
+  <!-- QUnit Test framework-->
+  <script type="text/javascript" src="build/js/lib/qunit.js" charset="utf-8"></script>
+  <link rel="stylesheet" href="build/js/lib/qunit.css" type="text/css" media="screen" />
+
+  <!-- the Test Suite-->
+  <script>
+    var loc = window.location;
+    var ws_uri = ((loc.protocol === "https:") ? "wss://" : "ws://") +
+                   loc.hostname + ":" + loc.port + loc.pathname;
+    var transport = new Thrift.TWebSocketTransport(ws_uri);
+    var protocol  = new Thrift.Protocol(transport);
+    var client    = new ThriftTest.ThriftTestClient(protocol);
+    transport.open();
+  </script>
+  <script type="text/javascript" src="test-es6.js" charset="utf-8"></script>
+</head>
+<body>
+  <h1 id="qunit-header">Thrift Javascript Bindings: Unit Test (<a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=test/ThriftTest.thrift;hb=HEAD">ThriftTest.thrift</a>)</h1>
+  <h2 id="qunit-banner"></h2>
+  <div id="qunit-testrunner-toolbar"></div>
+  <h2 id="qunit-userAgent"></h2>
+  <ol id="qunit-tests"><li><!-- get valid xhtml strict--></li></ol>
+  <!-- Uncomment this to check the validity. This significantly slows down the test.
+  <p>
+      <a href="http://validator.w3.org/check/referer"><img
+          src="http://www.w3.org/Icons/valid-xhtml10"
+          alt="Valid XHTML 1.0!" height="31" width="88" /></a>
+  </p>
+  -->
+</body>
+</html>
diff --git a/lib/js/test/test-es6.js b/lib/js/test/test-es6.js
new file mode 100644
index 0000000..a3a31dc
--- /dev/null
+++ b/lib/js/test/test-es6.js
@@ -0,0 +1,354 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ /* jshint -W100 */
+
+/*
+ * Fully Async JavaScript test suite for ThriftTest.thrift.
+ * These tests are designed to exercise the WebSocket transport
+ * (which is exclusively async).
+ *
+ * To compile client code for this test use:
+ *      $ thrift -gen js ThriftTest.thrift
+ */
+
+
+
+// all Languages in UTF-8
+var stringTest = "Afrikaans, Alemannisch, Aragonés, العربية, مصرى, Asturianu, Aymar aru, Azərbaycan, Башҡорт, Boarisch, Žemaitėška, Беларуская, Беларуская (тарашкевіца), Български, Bamanankan, বাংলা, Brezhoneg, Bosanski, Català, Mìng-dĕ̤ng-ngṳ̄, Нохчийн, Cebuano, ᏣᎳᎩ, Česky, Словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ, Чӑвашла, Cymraeg, Dansk, Zazaki, ދިވެހިބަސް, Ελληνικά, Emiliàn e rumagnòl, English, Esperanto, Español, Eesti, Euskara, فارسی, Suomi, Võro, Føroyskt, Français, Arpetan, Furlan, Frysk, Gaeilge, 贛語, Gàidhlig, Galego, Avañe'ẽ, ગુજરાતી, Gaelg, עברית, हिन्दी, Fiji Hindi, Hrvatski, Kreyòl ayisyen, Magyar, Հայերեն, Interlingua, Bahasa Indonesia, Ilokano, Ido, Íslenska, Italiano, 日本語, Lojban, Basa Jawa, ქართული, Kongo, Kalaallisut, ಕನ್ನಡ, 한국어, Къарачай-Малкъар, Ripoarisch, Kurdî, Коми, Kernewek, Кыргызча, Latina, Ladino, Lëtzebuergesch, Limburgs, Lingála, ລາວ, Lietuvių, Latviešu, Basa Banyumasan, Malagasy, Македонски, മലയാളം, मराठी, Bahasa Melayu, مازِرونی, Nnapulitano, Nedersaksisch, नेपाल भाषा, Nederlands, ‪Norsk (nynorsk)‬, ‪Norsk (bokmål)‬, Nouormand, Diné bizaad, Occitan, Иронау, Papiamentu, Deitsch, Norfuk / Pitkern, Polski, پنجابی, پښتو, Português, Runa Simi, Rumantsch, Romani, Română, Русский, Саха тыла, Sardu, Sicilianu, Scots, Sámegiella, Simple English, Slovenčina, Slovenščina, Српски / Srpski, Seeltersk, Svenska, Kiswahili, தமிழ், తెలుగు, Тоҷикӣ, ไทย, Türkmençe, Tagalog, Türkçe, Татарча/Tatarça, Українська, اردو, Tiếng Việt, Volapük, Walon, Winaray, 吴语, isiXhosa, ייִדיש, Yorùbá, Zeêuws, 中文, Bân-lâm-gú, 粵語";
+
+function checkRecursively(map1, map2) {
+  if (typeof map1 !== 'function' && typeof map2 !== 'function') {
+    if (!map1 || typeof map1 !== 'object') {
+        equal(map1, map2);
+    } else {
+      for (var key in map1) {
+        checkRecursively(map1[key], map2[key]);
+      }
+    }
+  }
+}
+
+module('Base Types');
+
+  asyncTest('Void', function() {
+    expect(1);
+    client.testVoid().then(function(result) {
+      equal(result, undefined);
+      QUnit.start();
+    });
+  });
+
+  asyncTest('String', function() {
+    expect(3);
+    QUnit.stop(2);
+    client.testString('').then(function(result) {
+       equal(result, '');
+       QUnit.start();
+    });
+    client.testString(stringTest).then(function(result) {
+       equal(result, stringTest);
+       QUnit.start();
+    });
+    var specialCharacters = 'quote: \" backslash:' +
+          ' forwardslash-escaped: \/ ' +
+          ' backspace: \b formfeed: \f newline: \n return: \r tab: ' +
+          ' now-all-of-them-together: "\\\/\b\n\r\t' +
+          ' now-a-bunch-of-junk: !@#$%&()(&%$#{}{}<><><';
+    client.testString(specialCharacters).then(function(result) {
+       equal(result, specialCharacters);
+       QUnit.start();
+    });
+  });
+
+  asyncTest('Double', function() {
+    expect(4);
+    QUnit.stop(3);
+    client.testDouble(0).then(function(result) {
+       equal(result, 0);
+       QUnit.start();
+    });
+    client.testDouble(-1).then(function(result) {
+       equal(result, -1);
+       QUnit.start();
+    });
+    client.testDouble(3.14).then(function(result) {
+       equal(result, 3.14);
+       QUnit.start();
+    });
+    client.testDouble(Math.pow(2, 60)).then(function(result) {
+       equal(result, Math.pow(2, 60));
+       QUnit.start();
+    });
+  });
+  // TODO: add testBinary()
+  asyncTest('Byte', function() {
+    expect(2);
+    QUnit.stop();
+    client.testByte(0).then(function(result) {
+       equal(result, 0);
+       QUnit.start();
+    });
+    client.testByte(0x01).then(function(result) {
+       equal(result, 0x01);
+       QUnit.start();
+    });
+  });
+  asyncTest('I32', function() {
+    expect(3);
+    QUnit.stop(2);
+    client.testI32(0).then(function(result) {
+       equal(result, 0);
+       QUnit.start();
+    });
+    client.testI32(Math.pow(2, 30)).then(function(result) {
+       equal(result, Math.pow(2, 30));
+       QUnit.start();
+    });
+    client.testI32(-Math.pow(2, 30)).then(function(result) {
+       equal(result, -Math.pow(2, 30));
+       QUnit.start();
+    });
+  });
+  asyncTest('I64', function() {
+    expect(3);
+    QUnit.stop(2);
+    client.testI64(0).then(function(result) {
+       equal(result, 0);
+       QUnit.start();
+    });
+    //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
+    client.testI64(Math.pow(2, 52)).then(function(result) {
+       equal(result, Math.pow(2, 52));
+       QUnit.start();
+    });
+    client.testI64(-Math.pow(2, 52)).then(function(result) {
+       equal(result, -Math.pow(2, 52));
+       QUnit.start();
+    });
+  });
+
+
+module('Structured Types');
+
+  asyncTest('Struct', function() {
+    expect(5);
+    var structTestInput = new ThriftTest.Xtruct();
+    structTestInput.string_thing = 'worked';
+    structTestInput.byte_thing = 0x01;
+    structTestInput.i32_thing = Math.pow(2, 30);
+    //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
+    structTestInput.i64_thing = Math.pow(2, 52);
+
+    client.testStruct(structTestInput).then(function(result) {
+      equal(result.string_thing, structTestInput.string_thing);
+      equal(result.byte_thing, structTestInput.byte_thing);
+      equal(result.i32_thing, structTestInput.i32_thing);
+      equal(result.i64_thing, structTestInput.i64_thing);
+      equal(JSON.stringify(result), JSON.stringify(structTestInput));
+      QUnit.start();
+    });
+  });
+
+  asyncTest('Nest', function() {
+    expect(7);
+    var xtrTestInput = new ThriftTest.Xtruct();
+    xtrTestInput.string_thing = 'worked';
+    xtrTestInput.byte_thing = 0x01;
+    xtrTestInput.i32_thing = Math.pow(2, 30);
+    //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
+    xtrTestInput.i64_thing = Math.pow(2, 52);
+
+    var nestTestInput = new ThriftTest.Xtruct2();
+    nestTestInput.byte_thing = 0x02;
+    nestTestInput.struct_thing = xtrTestInput;
+    nestTestInput.i32_thing = Math.pow(2, 15);
+
+    client.testNest(nestTestInput).then(function(result) {
+      equal(result.byte_thing, nestTestInput.byte_thing);
+      equal(result.struct_thing.string_thing, nestTestInput.struct_thing.string_thing);
+      equal(result.struct_thing.byte_thing, nestTestInput.struct_thing.byte_thing);
+      equal(result.struct_thing.i32_thing, nestTestInput.struct_thing.i32_thing);
+      equal(result.struct_thing.i64_thing, nestTestInput.struct_thing.i64_thing);
+      equal(result.i32_thing, nestTestInput.i32_thing);
+      equal(JSON.stringify(result), JSON.stringify(nestTestInput));
+      QUnit.start();
+    });
+  });
+
+  asyncTest('Map', function() {
+    expect(3);
+    var mapTestInput = {7: 77, 8: 88, 9: 99};
+
+    client.testMap(mapTestInput).then(function(result) {
+      for (var key in result) {
+        equal(result[key], mapTestInput[key]);
+      }
+      QUnit.start();
+    });
+  });
+
+  asyncTest('StringMap', function() {
+    expect(6);
+    var mapTestInput = {
+      'a': '123', 'a b': 'with spaces ', 'same': 'same', '0': 'numeric key',
+      'longValue': stringTest, stringTest: 'long key'
+    };
+
+    client.testStringMap(mapTestInput).then(function(result) {
+      for (var key in result) {
+        equal(result[key], mapTestInput[key]);
+      }
+      QUnit.start();
+    });
+  });
+
+  asyncTest('Set', function() {
+    expect(1);
+    var setTestInput = [1, 2, 3];
+    client.testSet(setTestInput).then(function(result) {
+      ok(result, setTestInput);
+      QUnit.start();
+    });
+  });
+
+  asyncTest('List', function() {
+    expect(1);
+    var listTestInput = [1, 2, 3];
+    client.testList(listTestInput).then(function(result) {
+      ok(result, listTestInput);
+      QUnit.start();
+    });
+  });
+
+  asyncTest('Enum', function() {
+    expect(1);
+    client.testEnum(ThriftTest.Numberz.ONE).then(function(result) {
+      equal(result, ThriftTest.Numberz.ONE);
+      QUnit.start();
+    });
+  });
+
+  asyncTest('TypeDef', function() {
+    expect(1);
+    client.testTypedef(69).then(function(result) {
+      equal(result, 69);
+      QUnit.start();
+    });
+  });
+
+
+module('deeper!');
+
+  asyncTest('MapMap', function() {
+    expect(16);
+    var mapMapTestExpectedResult = {
+      '4': {'1': 1, '2': 2, '3': 3, '4': 4},
+      '-4': {'-4': -4, '-3': -3, '-2': -2, '-1': -1}
+    };
+
+    client.testMapMap(1).then(function(result) {
+      for (var key in result) {
+        for (var key2 in result[key]) {
+          equal(result[key][key2], mapMapTestExpectedResult[key][key2]);
+        }
+      }
+      checkRecursively(result, mapMapTestExpectedResult);
+      QUnit.start();
+    });
+  });
+
+
+module('Exception');
+
+  asyncTest('Xception', function() {
+    expect(2);
+    client.testException('Xception').then(function(res) {
+      ok(false);
+    }).catch(function(e) {
+      equal(e.errorCode, 1001);
+      equal(e.message, 'Xception');
+      QUnit.start();
+    });
+  });
+
+  asyncTest('no Exception', 0, function() {
+    expect(1);
+    client.testException('no Exception').then(function(e) {
+      ok(!e);
+      QUnit.start();
+    });
+  });
+
+module('Insanity');
+
+  asyncTest('testInsanity', function() {
+    expect(24);
+    var insanity = {
+      '1': {
+        '2': {
+          'userMap': { '5': 5, '8': 8 },
+          'xtructs': [{
+              'string_thing': 'Goodbye4',
+              'byte_thing': 4,
+              'i32_thing': 4,
+              'i64_thing': 4
+            },
+            {
+              'string_thing': 'Hello2',
+              'byte_thing': 2,
+              'i32_thing': 2,
+              'i64_thing': 2
+            }
+          ]
+        },
+        '3': {
+          'userMap': { '5': 5, '8': 8 },
+          'xtructs': [{
+              'string_thing': 'Goodbye4',
+              'byte_thing': 4,
+              'i32_thing': 4,
+              'i64_thing': 4
+            },
+            {
+              'string_thing': 'Hello2',
+              'byte_thing': 2,
+              'i32_thing': 2,
+              'i64_thing': 2
+            }
+          ]
+        }
+      },
+      '2': { '6': { 'userMap': null, 'xtructs': null } }
+    };
+    client.testInsanity(new ThriftTest.Insanity()).then(function(res) {
+      ok(res, JSON.stringify(res));
+      ok(insanity, JSON.stringify(insanity));
+      checkRecursively(res, insanity);
+      QUnit.start();
+    });
+  });
+
+module('Oneway');
+  asyncTest('testOneway', function() {
+    expect(1);
+    client.testOneway(1).then(function(result) {
+      equal(result, undefined);
+      QUnit.start();
+    });
+  });
\ No newline at end of file
