Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions __testfixtures__/ember-qunit-codemod/subject.input.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ test('has some thing', function (assert) {
let subject = this.subject();
});

test('has another thing', function (assert) {
let subject = this.subject({ size: 'big' });
['big', 'small'].forEach(function (size) {
test('has another thing', function (assert) {
let subject = this.subject({ size });
});
});

moduleForModel('foo', 'Integration | Model | Foo', {
Expand Down
6 changes: 4 additions & 2 deletions __testfixtures__/ember-qunit-codemod/subject.output.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ module('Unit | Model | Foo', function(hooks) {
let subject = run(() => this.owner.lookup('service:store').createRecord('foo'));
});

test('has another thing', function (assert) {
let subject = run(() => this.owner.lookup('service:store').createRecord('foo', { size: 'big' }));
['big', 'small'].forEach(function (size) {
test('has another thing', function (assert) {
let subject = this.owner.factoryFor('component:foo-bar').create({ size });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be let subject = run(() => this.owner.lookup('service:store').createRecord('foo', { size })); ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I keep moving the code snippet to the wrong place... the lines with similar names make it hard to grok where I am.
I'll move it again

});
});
});

Expand Down