diff --git a/test/fixtures/codemod/latest-node/my-app/app/controllers/application.js b/test/fixtures/codemod/latest-node/my-app/app/controllers/application.js index 3ab228e66..120047e65 100644 --- a/test/fixtures/codemod/latest-node/my-app/app/controllers/application.js +++ b/test/fixtures/codemod/latest-node/my-app/app/controllers/application.js @@ -1,6 +1,7 @@ import Controller from '@ember/controller'; import Ember from 'ember'; import { assign } from '@ember/polyfills'; +import { map } from '@ember/object/computed'; export default Controller.extend({ fullName: computed('firstName', 'lastName', function() { @@ -11,6 +12,10 @@ export default Controller.extend({ return `${this.firstName} ${this.lastName}`; }, + friendNames: map('friends', ['nameKey'], function(friend) { + return friend[this.nameKey]; + }), + actions: { foo(object) { this.doStuff(object); diff --git a/test/fixtures/codemod/local/my-app/app/controllers/application.js b/test/fixtures/codemod/local/my-app/app/controllers/application.js index c9137a10d..d2431a133 100644 --- a/test/fixtures/codemod/local/my-app/app/controllers/application.js +++ b/test/fixtures/codemod/local/my-app/app/controllers/application.js @@ -1,5 +1,6 @@ import Ember from 'ember'; import { merge } from '@ember/polyfills'; +import { map } from '@ember/object/computed'; export default Ember.Controller.extend({ fullName: computed(function() { @@ -10,6 +11,10 @@ export default Ember.Controller.extend({ return `${this.firstName} ${this.lastName}`; }).volatile('firstName', 'lastName'), + friendNames: map('friends', function(friend) { + return friend[this.nameKey]; + }).property('nameKey'), + actions: { foo(object) { Ember.propertyWillChange(object, 'someProperty'); diff --git a/test/fixtures/codemod/min-node/my-app/app/controllers/application.js b/test/fixtures/codemod/min-node/my-app/app/controllers/application.js index 3ab228e66..120047e65 100644 --- a/test/fixtures/codemod/min-node/my-app/app/controllers/application.js +++ b/test/fixtures/codemod/min-node/my-app/app/controllers/application.js @@ -1,6 +1,7 @@ import Controller from '@ember/controller'; import Ember from 'ember'; import { assign } from '@ember/polyfills'; +import { map } from '@ember/object/computed'; export default Controller.extend({ fullName: computed('firstName', 'lastName', function() { @@ -11,6 +12,10 @@ export default Controller.extend({ return `${this.firstName} ${this.lastName}`; }, + friendNames: map('friends', ['nameKey'], function(friend) { + return friend[this.nameKey]; + }), + actions: { foo(object) { this.doStuff(object);