kneden
kneden copied to clipboard
Doesn't work with es2015-classes
class Test {
async test() {
throw new Error('test-error');
}
}
AssertionError [ERR_ASSERTION]: '\'use strict\';\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length == 'class Test {\n test() {\n return Promise.resolve().then(function () {\n throw new Error(\'test-error\');\n
+ expected - actual
-'use strict';
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0;i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function"); } }
-
-var Test = function () {
- function Test() {
- _classCallCheck(this, Test);
+class Test {
+ test() {
+ return Promise.resolve().then(function () {
+ throw new Error('test-error');
+ });
}
-
- _createClass(Test, [{
- key: 'test',
- value: function test() {
- throw new Error('test-error');
- }
- }]);
-
- return Test;
-}();
+}
at Context.<anonymous> (test/index.js:30:14)
Thanks for filing. Beware that this module is essentially unmaintained currently. Happy to leave this open, but it probably won't get fixed.
You may want to take a look at https://www.npmjs.com/package/fast-async