We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ember g component-test foo
import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; module('Integration | Component | foo', function(hooks) { setupRenderingTest(hooks); test('it renders', async function(assert) { // Set any properties with this.set('myProperty', 'value'); // Handle any actions with this.set('myAction', function(val) { ... }); await render(hbs`<Foo />`); assert.equal(this.element.textContent.trim(), ''); // Template block usage: await render(hbs` <Foo> template block text </Foo> `); assert.equal(this.element.textContent.trim(), 'template block text'); }); });
ember g component-test foo/bar
import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; module('Integration | Component | foo/bar', function(hooks) { setupRenderingTest(hooks); test('it renders', async function(assert) { // Set any properties with this.set('myProperty', 'value'); // Handle any actions with this.set('myAction', function(val) { ... }); await render(hbs`{{foo/bar}}`); assert.equal(this.element.textContent.trim(), ''); // Template block usage: await render(hbs` {{#foo/bar}} template block text {{/foo/bar}} `); assert.equal(this.element.textContent.trim(), 'template block text'); }); });
The text was updated successfully, but these errors were encountered:
We need to remove this logic: https://github.com/emberjs/ember.js/blob/master/blueprints/component-test/index.js#L108
Sorry, something went wrong.
<Nested::Invocation>
[BUGFIX] Use <Nested::Invocation> in tests
2dd2fea
Fixes #18242
fac3dc6
Fixes #18242 (cherry picked from commit 2dd2fea)
Successfully merging a pull request may close this issue.
ember g component-test foo
ember g component-test foo/bar
The text was updated successfully, but these errors were encountered: