mwootendev / ngx-translate-plugins

Utilities plugins for the @ngx-translate translation library.
MIT License
15 stars 10 forks source link

6.0.0: Unexpected value 'TranslateTestingModule' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation. #49

Closed joseluissb closed 2 years ago

joseluissb commented 2 years ago

Describe the bug After upgrading to 6.0.0 and Angular 13 I'm having this error when running my tests.

To Reproduce

Expected behavior

Screenshots

Desktop (please complete the following information):

mwootendev commented 2 years ago

@joseluissb Can you provide a little more detail about the error you are seeing? I have not been able to reproduce this issue with Angular 13.0.1 and ngx-translate 14.0.0 on Node 14.17.1. Can you explain how your setup is different than the one I'm using here: https://github.com/mwootendev/ngx-translate-plugins/blob/develop/src/app/app.component.spec.ts#L22?

JamesHenry commented 2 years ago

@mwootendev As per my other note I have provided a write up in #50 which reproduces this, the key point is that jest is the test runner

joseluissb commented 2 years ago

@mwootendev thanks for the help. The only difference I can see is that we use Jest and it started happening after we migrated to Angular 13.

Also, we don't use the .withCompiler(new TranslateMessageFormatCompiler()) part, but I don't think that should be the problem.

Thanks

mwootendev commented 2 years ago

@JamesHenry thanks for the explanation in #50. I was able to publish a new 6.0.1 version with Ivy partial support enabled. This should hopefully resolve this issue.