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

Deprecation Warning thrown with needs:[] #196

Merged
merged 3 commits into from
Feb 14, 2017

Conversation

canufeel
Copy link
Contributor

  • Fix moduleForComponent unit test deprecation being raised even if needs is provided.
  • Add a test case.

Fixes: #195

Copy link
Member

@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.

nice work! 👍

setupRegistry();
testModule = new TestModuleForComponent('pretty-color', { needs: ['x:foo'] });
notOk(deprecations.find(function(deprecation) {
return deprecation.length === 3 && deprecation[2].id === deprecationId;
Copy link
Member

Choose a reason for hiding this comment

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

would it make sense to only collect the id properties in the mocked deprecate() function above to simplify the logic here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are probably right. It would simplify the overall logic

Copy link
Member

@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.

seems good to me. @trentmwillis @rwjblue any opinions?

@rwjblue rwjblue merged commit 356dde4 into emberjs:master Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants