Skip to content

Commit 7b3e871

Browse files
rajasegarKelly Selden
authored andcommitted
try cp-property codemod for 3.8 (#720)
[CHORE] Add tests for cp-property codemod
1 parent c0d0865 commit 7b3e871

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

test/fixtures/codemod/latest-node/my-app/app/controllers/application.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import Ember from 'ember';
33
import { assign } from '@ember/polyfills';
44

55
export default Controller.extend({
6+
fullName: computed('firstName', 'lastName', function() {
7+
return `${this.firstName} ${this.lastName}`;
8+
}),
9+
610
actions: {
711
foo(object) {
812
this.doStuff(object);

test/fixtures/codemod/local/my-app/app/controllers/application.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import Ember from 'ember';
22
import { merge } from '@ember/polyfills';
33

44
export default Ember.Controller.extend({
5+
fullName: computed(function() {
6+
return `${this.firstName} ${this.lastName}`;
7+
}).property('firstName', 'lastName'),
8+
59
actions: {
610
foo(object) {
711
Ember.propertyWillChange(object, 'someProperty');

test/fixtures/codemod/min-node/my-app/app/controllers/application.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import Ember from 'ember';
33
import { assign } from '@ember/polyfills';
44

55
export default Controller.extend({
6+
fullName: computed('firstName', 'lastName', function() {
7+
return `${this.firstName} ${this.lastName}`;
8+
}),
9+
610
actions: {
711
foo(object) {
812
this.doStuff(object);

0 commit comments

Comments
 (0)