swagger-api/swagger-codegen

[JavaScript][ES6] The Petstore integration tests failed

Open

#5,928 opened on Jun 26, 2017

View on GitHub
 (12 comments) (0 reactions) (0 assignees)HTML (12,701 stars) (5,474 forks)batch import
Client: JavaScript/Node.jsIssue: Non-operationalhelp wanted

Description

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.

Contributor guide