Skip to content

Commit

Permalink
Use explicit this in helper-test blueprints
Browse files Browse the repository at this point in the history
(cherry picked from commit 844c2f4)
  • Loading branch information
bertdeblock authored and chancancode committed May 27, 2021
1 parent dc1cc22 commit 7959115
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('<%= friendlyTestName %>', function() {
// `);
this.set('inputValue', '1234');

this.render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

expect(this.$().text().trim()).to.equal('1234');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describeComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleNam
// `);
this.set('inputValue', '1234');

this.render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

expect(this.$().text().trim()).to.equal('1234');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('<%= friendlyTestName %>', function() {
it('renders', async function() {
this.set('inputValue', '1234');

await render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

expect(this.element.textContent.trim()).to.equal('1234');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleForComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleNa
test('it renders', function(assert) {
this.set('inputValue', '1234');

this.render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

assert.equal(this.$().text().trim(), '1234');
});<% } else if (testType == 'unit') { %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module('<%= friendlyTestName %>', function(hooks) {
test('it renders', async function(assert) {
this.set('inputValue', '1234');

await render(hbs`{{<%= dasherizedModuleName %> inputValue}}`);
await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

assert.dom(this.element).hasText('1234');
});
Expand Down
2 changes: 1 addition & 1 deletion node-tests/fixtures/helper-test/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleForComponent('foo/bar-baz', 'helper:foo/bar-baz', {
test('it renders', function(assert) {
this.set('inputValue', '1234');

this.render(hbs`{{foo/bar-baz inputValue}}`);
this.render(hbs`{{foo/bar-baz this.inputValue}}`);

assert.equal(this.$().text().trim(), '1234');
});
2 changes: 1 addition & 1 deletion node-tests/fixtures/helper-test/mocha-0.12.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Integration | Helper | foo/bar-baz', function() {
// `);
this.set('inputValue', '1234');

this.render(hbs`{{foo/bar-baz inputValue}}`);
this.render(hbs`{{foo/bar-baz this.inputValue}}`);

expect(this.$().text().trim()).to.equal('1234');
});
Expand Down
2 changes: 1 addition & 1 deletion node-tests/fixtures/helper-test/mocha-rfc232.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('Integration | Helper | foo/bar-baz', function() {
it('renders', async function() {
this.set('inputValue', '1234');

await render(hbs`{{foo/bar-baz inputValue}}`);
await render(hbs`{{foo/bar-baz this.inputValue}}`);

expect(this.element.textContent.trim()).to.equal('1234');
});
Expand Down
2 changes: 1 addition & 1 deletion node-tests/fixtures/helper-test/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describeComponent('foo/bar-baz', 'helper:foo/bar-baz',
// `);
this.set('inputValue', '1234');

this.render(hbs`{{foo/bar-baz inputValue}}`);
this.render(hbs`{{foo/bar-baz this.inputValue}}`);

expect(this.$().text().trim()).to.equal('1234');
});
Expand Down
2 changes: 1 addition & 1 deletion node-tests/fixtures/helper-test/rfc232.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module('Integration | Helper | foo/bar-baz', function(hooks) {
test('it renders', async function(assert) {
this.set('inputValue', '1234');

await render(hbs`{{foo/bar-baz inputValue}}`);
await render(hbs`{{foo/bar-baz this.inputValue}}`);

assert.dom(this.element).hasText('1234');
});
Expand Down

0 comments on commit 7959115

Please sign in to comment.