ember-test-component
ember-test-component copied to clipboard
doesn't work with Ember 3 - resolveRegistration has been deprecated
more details https://www.emberjs.com/deprecations/v2.x/#toc_ember-application-registry-ember-applicationinstance-registry
the test file fails in registerTestComponent (sample generated tests/integration/components/my-component-test.js)
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import { registerTestComponent, unregisterTestComponent } from 'my-app/tests/ember-test-component';
module('Integration | Component | my-component', function(hooks) {
setupRenderingTest(hooks);
hooks.beforeEach(function() {
unregisterTestComponent(this);
});
test('it renders my component using the passed in component', async function(assert) {
registerTestComponent(this, { layout: hbs`{{ model.name }}` });
await render(hbs`{{my-component}}`);
assert.equal(this.element.textContent.trim(), '');
});
from my package.json
"ember-cli": "~3.3.0",
"ember-test-component": "^0.2.1",