Skip to content
This repository was archived by the owner on Jun 10, 2019. It is now read-only.
This repository was archived by the owner on Jun 10, 2019. It is now read-only.

Doesn't work with es2015-classes #122

Description

@z-vr
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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions