Skip to content

[JavaScript][ES6] The Petstore integration tests failed #5928

Open
@wing328

Description

@wing328
Description

The Petstore integration tests for JS ES6 failed

/private/tmp/swagger-codegen/samples/client/petstore/javascript-promise-es6/node_modules/babel-core/lib/transformation/file/index.js:600
      throw err;
      ^

SyntaxError: /private/tmp/swagger-codegen/samples/client/petstore/javascript-promise-es6/src/model/AnimalFarm.js: Invalid left-hand side in assignment expression (37:8)
  35 |     constructor() {
  36 |         
> 37 |         this = new Array();
     |         ^
  38 |         Object.setPrototypeOf(this, AnimalFarm);
  39 | 
  40 |         
    at Parser.pp$5.raise (/private/tmp/swagger-codegen/samples/client/petstore/javascript-promise-es6/node_modules/babylon/lib/index.js:4454:13)
    at Parser.pp$2.toAssignable (/private/tmp/swagger-codegen/samples/client/petstore/javascript-promise-es6/node_modules/babylon/lib/index.js:3008:16)
Swagger-codegen version

Latest master.

Steps to reproduce

To repeat the issue for javascript-promise-es6

cd samples/client/petstore/javascript-promise-es6
npm install
npm test

To repeat the issue for javascript-es6

cd samples/client/petstore/javascript-es6
npm install
npm test
Suggest a Fix

If anyone wants to work on the issue, please reply to let us know.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions