Skip to content

Commit

Permalink
Merge pull request #13147 from chadhietala/move-helper-lookup
Browse files Browse the repository at this point in the history
[Glimmer2] Move Helper Lookup Test
  • Loading branch information
chancancode committed Mar 24, 2016
2 parents 0569af0 + 00e5157 commit 503c8b1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,39 @@ let assert = QUnit.assert;

moduleFor('Helpers test: custom helpers', class extends RenderingTest {

['@test it can resolve custom simple helpers']() {
['@test it can resolve custom simple helpers with or without dashes']() {
this.registerHelper('hello', () => 'hello');
this.registerHelper('hello-world', () => 'hello world');

this.render('{{hello-world}}');
this.render('{{hello}} | {{hello-world}}');

this.assertText('hello | hello world');

this.runTask(() => this.rerender());

this.assertText('hello world');
this.assertText('hello | hello world');
}

['@test it can resolve custom class-based helpers']() {
['@test it can resolve custom class-based helpers with or without dashes']() {
this.registerHelper('hello', {
compute() {
return 'hello';
}
});

this.registerHelper('hello-world', {
compute() {
return 'hello world';
}
});

this.render('{{hello-world}}');
this.render('{{hello}} | {{hello-world}}');

this.assertText('hello | hello world');

this.runTask(() => this.rerender());

this.assertText('hello world');
this.assertText('hello | hello world');
}

['@htmlbars class-based helper can recompute a new value']() {
Expand Down
43 changes: 0 additions & 43 deletions packages/ember-htmlbars/tests/integration/helper-lookup-test.js

This file was deleted.

0 comments on commit 503c8b1

Please sign in to comment.