Skip to content

Conversation

jbryson3
Copy link
Contributor

During my conversion to 0.14 testing api, I found that all the arguments I was passing to this.subject() in my model tests were getting blown away.

//input
let model = this.subject({key: 'value'})
//output
let model = this.owner.lookup(%model%).createRecord();

This PR will preserve the argument passed to this.subject

//input
let model = this.subject({key: 'value'})
//output
let model = this.owner.lookup(%model%).createRecord({key: 'value'});

Copy link
Collaborator

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

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

thanks 🙏

@Turbo87 Turbo87 added the bug label Feb 21, 2020
@Turbo87 Turbo87 merged commit 74c6772 into ember-codemods:master Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants