Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding nested test failing testcase #63

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
Contributor 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