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

Use explicit this in helper-test blueprints #19544

Merged
merged 1 commit into from May 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
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
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
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
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
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
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
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
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