ember-test-component icon indicating copy to clipboard operation
ember-test-component copied to clipboard

doesn't work with Ember 3 - resolveRegistration has been deprecated

Open zsoldosp opened this issue 7 years ago • 0 comments

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",

zsoldosp avatar Aug 24 '18 15:08 zsoldosp