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

Glint can't handle hbs (from ember-cli-htmlbars) while in a gjs file. #705

Open
NullVoxPopuli opened this issue Mar 7, 2024 · 0 comments

Comments

@NullVoxPopuli
Copy link
Contributor

I would expect hbs would be ignored while folks incrementally migrate their tests.

For example:

test('...', async function (assert) {
  const Foo = <template>hi</template>;
  this.Foo = Foo;

  await render(hbs`<this.Foo />`);
}

instead what happens is that you get this error:

> glint

tests/integration/modifiers/ugh-test.gjs:13:36 - error TS1109: Expression expected.

13   await render(hbs`text <this.Foo />`);
                                      ~

tests/integration/modifiers/ugh-test.gjs:16:1 - error TS1160: Unterminated template literal.

16 
   

full file / repro
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';

module('...', function (hooks) {
	setupRenderingTest(hooks);

	test('...', async function (assert) {
		const Foo = <template>hi there</template>;
		this.Foo = Foo;

		await render(hbs`text <this.Foo />`);
	});
});
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

1 participant