ember-codemods / ember-qunit-codemod

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

this.render() in beforeEach() is not converted to async/await

Turbo87 opened this issue · comments

moduleForComponent('foo', 'Integration | Helper | foo', {
  integration: true,

  async beforeEach() {
    this.intl = this.container.lookup('service:intl');
    await this.intl.loadLocale('en');

    this.render(hbs`{{foo}}`);
  },
});

It also seems that the test functions are being converted to async functions even though the async operation (render()) happens in the beforeEach() block

Ya, we convert all the tests to async all the time (for setupRenderingTest).

We only process the test invocations for await render at the moment. We need to apply to the lifecycle hooks also.