-
Notifications
You must be signed in to change notification settings - Fork 183
Ember.Handlebars.SafeString depreciation thrown with latest ember version. #364
Comments
Just now noticed PR #363 missed it somehow. |
Can you check with the core team about how we should assert that something is a safe-string? |
moduleForComponent('asdf', { integration: true });
test('renders html', function(assert) {
this.render(hbs`{{some-helper}}`);
assert.equal(this.$('.some-selector-for-html-values-from-helper').length, 1, 'found html from helper');
}); The problem is that we don't have a component in the Ember-I18n test suite to test. We could create a synthetic one in the dummy app and then test it: moduleForComponent('dummy-component', 't helper', { integration: true });
test('t escapes HTML', function(assert) {
this.render(hbs`{{t ...}}`);
...
}); That's a bit of an awkward workaround, but it very well might work. |
The plan is to undeprecate Related: emberjs/ember.js#13318 and emberjs/rfcs#139 |
@jamesarosen - No component is needed for that snippet. Just a helper, that you invoke from within this.render. |
How would I get |
I also created a polyfill for the RFC which seeks to add |
@jamesarosen - See https://github.com/aptible/dashboard.aptible.com/blob/master/tests/integration/helpers/eq-test.js. |
jamesarosen/ember-i18n has been deprecated in favor of ember-intl. |
There is a reference in compile-template.js throwing a depreciation warning in the latest ember beta.
Easy enough to switch to Ember.String.htmlSafe but I'm not sure what that does to the tests
The text was updated successfully, but these errors were encountered: