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

moduleForComponent stopped working in ember-source@3.13.0-beta.1 #18305

Closed
ro0gr opened this issue Aug 24, 2019 · 3 comments
Closed

moduleForComponent stopped working in ember-source@3.13.0-beta.1 #18305

ro0gr opened this issue Aug 24, 2019 · 3 comments

Comments

@ro0gr
Copy link
Contributor

ro0gr commented Aug 24, 2019

A simple moduleForComponent-style render test, like:

import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('test', 'Integration | test', {
  integration: true
});

test('Test', async function(assert) {
  this.render(hbs`test`);

  assert.ok(true);
});

leads to the following error:

TypeError: Cannot read property 'lookup' of undefined

which is raised from

let compiler = owner.lookup<LazyCompiler<StaticTemplateMeta>>(TEMPLATE_COMPILER_MAIN)!;

This error occurs starting from ember-source@3.13.0-beta.1 and still persists in ember-source@3.13.0-beta.3.

Here is a repo with reproduction - https://github.com/ro0gr/ember-moduleForComponent-owner

Copy link
Member

rwjblue commented Aug 24, 2019

Thank you for reporting! I believe emberjs/ember-test-helpers#677 would fix, but I wanted to actually dig into things first to make sure we don’t make unneeded changes to the “legacy” testing system (if we can instead mitigate in Ember itself).

@ro0gr
Copy link
Contributor Author

ro0gr commented Sep 6, 2019

I've checked, the issue is fixed with emberjs/ember-test-helpers#677. Thanks!

@ro0gr ro0gr closed this as completed Sep 6, 2019
Copy link
Member

rwjblue commented Sep 6, 2019

Thank you for confirming!

ro0gr added a commit to san650/ember-cli-page-object that referenced this issue Sep 6, 2019
in order to:
 - avoid Ember.$ deprecations in deprecation sensitive tests
 - fix moduleForComponent tests breakage for ember-source@3.13-beta
   @see: emberjs/ember.js#18305
ro0gr added a commit to ro0gr/ember-cli-page-object that referenced this issue Sep 7, 2019
in order to:
 - avoid Ember.$ deprecations in deprecation sensitive tests
 - fix moduleForComponent tests breakage for ember-source@3.13-beta
   @see: emberjs/ember.js#18305
ro0gr added a commit to ro0gr/ember-cli-page-object that referenced this issue Sep 7, 2019
in order to:
 - avoid Ember.$ deprecations in deprecation sensitive tests
 - fix moduleForComponent tests breakage for ember-source@3.13-beta
   @see: emberjs/ember.js#18305
ro0gr added a commit to ro0gr/ember-cli-page-object that referenced this issue Sep 7, 2019
in order to:
 - avoid Ember.$ deprecations in deprecation sensitive tests
 - fix moduleForComponent tests breakage for ember-source@3.13-beta
   @see: emberjs/ember.js#18305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants