-
-
Notifications
You must be signed in to change notification settings - Fork 583
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
Testing of standalone components #1508
Comments
Same here. but in my project I am testing only if the translation keys appears and they are correct. Unfortunately, after converting some components to standalone, nothing is rendered, even if I use |
I18NEXT_SERVICE ??? |
@adam-ai-97 |
This is how I configure the tests for the TranslatePipe. |
I need to test the correctness of translations for a component, which I can't do due to translation moc issues.
component:
Test:
The test is dropping because the translations haven't pulled up.
But if you do this: TestBed.inject(TranslateService).use('en');
I can see the getTranslation(_) visit but it has no effect on pipe and tests fail too.
I use separate translation sets for different models and everything is fine in the final project, here's an example:
Previously before switching to standalone I used this:
And the tests worked, but when switching to standalone it feels like translations are compiled before the test module is created, where providers for translations are defined.
The text was updated successfully, but these errors were encountered: