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

Implement user-helpers resolution #12917

Merged
merged 1 commit into from
Feb 6, 2016

Conversation

chancancode
Copy link
Member

For now, I only ported two tests to show that it works.

For now, I only ported two tests to show that it works.
@@ -23,36 +23,6 @@ QUnit.module('ember-htmlbars: custom app helpers', {
}
});

QUnit.test('dashed shorthand helper is resolved from container', function() {
Copy link
Member Author

Choose a reason for hiding this comment

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

Replaced by "it can resolve custom helpers"

Copy link
Member Author

Choose a reason for hiding this comment

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

At first I thought the "dashed" in the name implies that we have another "test matrix" situation here, but turns out literally all the tests in this file is prefixed with "dashed"

Copy link
Member

Choose a reason for hiding this comment

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

yes, we used to have a distinction between dashed and non-dashed, but that was removed in 1.13.

registerHelper(name, funcOrClassBody) {
let type = typeof funcOrClassBody;

if (type === 'function') {
Copy link
Member

Choose a reason for hiding this comment

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

I think we should detect instances of Ember.Helper and throw before this. We do not support Ember.Helper.extend() style helpers, but typeof Ember.Helper.extend() === 'function'.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is an internal abstraction for the test. This and this is how that is being used in practice. The reason is that we cannot expose Helper and helper to the test file (because they are different between ember-htmlbars and ember-glimmer).

rwjblue added a commit that referenced this pull request Feb 6, 2016
@rwjblue rwjblue merged commit 7bc331d into emberjs:master Feb 6, 2016
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.

2 participants