Skip to content

Commit f4bc070

Browse files
committed
Add failing test for double-actions import bug
1 parent 79e6caf commit f4bc070

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"lint:prettier:fix": "prettier --write .",
4444
"lint:ts": "tsc --noEmit",
4545
"test": "yarn build && codemod-cli test && node ./test/run-test.js && yarn clean",
46+
"fixme": "rm codemods.log && yarn build && codemod-cli test; yarn clean",
4647
"update-docs": "codemod-cli update-docs"
4748
},
4849
"dependencies": {
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import EmberObject, { action, set } from '@ember/object';
2+
3+
const Foo = EmberObject.extend({
4+
@action
5+
toggleShowing() {
6+
set(this, 'isShowing', !this.isShowing);
7+
},
8+
9+
actions: {
10+
toggleSnowing() {
11+
set(this, 'isSnowing', !this.isSnowing);
12+
}
13+
}
14+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import classic from 'ember-classic-decorator';
2+
import EmberObject, { action, set } from '@ember/object';
3+
4+
@classic
5+
class Foo extends EmberObject {
6+
@action
7+
toggleShowing() {
8+
set(this, 'isShowing', !this.isShowing);
9+
}
10+
11+
@action
12+
toggleSnowing() {
13+
set(this, 'isSnowing', !this.isSnowing);
14+
}
15+
}

0 commit comments

Comments
 (0)