-
Notifications
You must be signed in to change notification settings - Fork 167
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
A simple, autogenerated integration test fails for a component using a translation in ember-intl 6.1.2 #1794
Comments
I am also experiencing this error on Ember 3.28 (development mode & tests) with Ember-intl 6.1.2. It seems to occur when using a template helper if the service hasn't been injected anywhere else yet. Injecting This is a very similar error to what you'd receive from updating a @Tracked variable (used in the template) in a constructor() of a glimmer component. |
To confirm, did you follow the migration guide in https://ember-intl.github.io/ember-intl/docs/guide/migration-5-0-to-6-1#missing-setupintl-results-in-a-runtime-error? |
@ijlee2 Nope. I would not expect to need to follow a migration / upgrading guide when creating an app for the first time with the latest version. This probably needs to be in the README. |
For this addon, I don't think the |
If anyone wants to avoid having to add this hook to every test, this instance-initializer worked for me to solve tests. Might be slightly slower than choosing specific tests to add the setupIntl(hooks) but way easier and don't need to always remember to do this when writing new tests:
|
@kdagnan I recommend customizing |
Environment
Steps to Reproduce
<repo-name>
hello: Hello World!
{{t 'hello'}}
<MyComponent />
npm test
Reproduction
https://github.com/Gaurav0/bug-ember-intl-int-test
Output
The text was updated successfully, but these errors were encountered: