ember-qunit-codemod icon indicating copy to clipboard operation
ember-qunit-codemod copied to clipboard

`this.on(var` gets `undefined does not match field "name"`

Open kellyselden opened this issue 6 years ago • 0 comments

    ['myAction1', 'myAction2'].forEach(action => {
      this.on(action, () => {
        // ...
      });
    });
 ERR tests/integration/components/my-camera-test.js Transformation error (undefined does not match field "name": string of type Identifier)
Error: undefined does not match field "name": string of type Identifier
    at addParam (C:\Users\kelly\AppData\Roaming\npm-cache\_npx\6296\node_modules\ember-qunit-codemod\node_modules\ast-types\lib\types.js:565:23)
    at C:\Users\kelly\AppData\Roaming\npm-cache\_npx\6296\node_modules\ember-qunit-codemod\node_modules\ast-types\lib\types.js:594:21
    at Array.forEach (<anonymous>)
    at Function.identifier (C:\Users\kelly\AppData\Roaming\npm-cache\_npx\6296\node_modules\ember-qunit-codemod\node_modules\ast-types\lib\types.js:592:30)
    at NodePath.<anonymous> (C:\Users\kelly\AppData\Roaming\npm-cache\_npx\6296\node_modules\ember-qunit-codemod\transforms\convert-module-for-to-setup-test/index.js:806:24)
    at C:\Users\kelly\AppData\Roaming\npm-cache\_npx\6296\node_modules\ember-qunit-codemod\node_modules\jscodeshift\src\Collection.js:77:36
    at Array.forEach (<anonymous>)
    at Collection.forEach (C:\Users\kelly\AppData\Roaming\npm-cache\_npx\6296\node_modules\ember-qunit-codemod\node_modules\jscodeshift\src\Collection.js:76:18)
    at updateOnCalls (C:\Users\kelly\AppData\Roaming\npm-cache\_npx\6296\node_modules\ember-qunit-codemod\transforms\convert-module-for-to-setup-test/index.js:804:12)
    at NodePath.<anonymous> (C:\Users\kelly\AppData\Roaming\npm-cache\_npx\6296\node_modules\ember-qunit-codemod\transforms\convert-module-for-to-setup-test/index.js:724:13)

kellyselden avatar Nov 02 '19 22:11 kellyselden