You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to make unit tests for my components that use . For this to work I need to import the FeatherModule. But when running the unit tests I keep getting the following error:
Unexpected value 'FeatherModule' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation.
at verifySemanticsOfNgModuleDef (../packages/core/src/render3/jit/module.ts:200:13)
at ../packages/core/src/render3/jit/module.ts:211:5
at Array.forEach (<anonymous>)
at verifySemanticsOfNgModuleDef (../packages/core/src/render3/jit/module.ts:209:58)
at Function.get (../packages/core/src/render3/jit/module.ts:169:13)
at R3TestBedCompiler.Object.<anonymous>.R3TestBedCompiler.applyProviderOverridesToModule (../packages/core/testing/src/r3_test_bed_compiler.ts:414:49)
at R3TestBedCompiler.Object.<anonymous>.R3TestBedCompiler.compileTestModule (../packages/core/testing/src/r3_test_bed_compiler.ts:677:10)
at R3TestBedCompiler.Object.<anonymous>.R3TestBedCompiler.finalize (../packages/core/testing/src/r3_test_bed_compiler.ts:245:10)
at TestBedRender3.get (../packages/core/testing/src/r3_test_bed.ts:380:43)
at TestBedRender3.Object.<anonymous>.TestBedRender3.inject (../packages/core/testing/src/r3_test_bed.ts:278:25)
at TestBedRender3.Object.<anonymous>.TestBedRender3.createComponent (../packages/core/testing/src/r3_test_bed.ts:335:40)
at Function.Object.<anonymous>.TestBedRender3.createComponent (../packages/core/testing/src/r3_test_bed.ts:182:33)
at projects/pig-settings-library/src/lib/components/employee/employee.component.spec.ts:69:23
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:407:30)
at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvoke (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:3765:43)
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:406:56)
at Zone.Object.<anonymous>.Zone.run (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:167:47)
at Object.wrappedFunc (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:4250:34)
I also tried to add a IconModule and import that one to my unit test but got the same result.
I'm currently in Angular 12.x , i will be back with more information after the migration, it look like version 6.3.0 have been introduce for Angular 13+
Trying to make unit tests for my components that use . For this to work I need to import the FeatherModule. But when running the unit tests I keep getting the following error:
I also tried to add a IconModule and import that one to my unit test but got the same result.
This is my Unit test setup code:
Currently using version 6.2.0 because 6.3.0 is not working for me cause of my Angular version.
Anyone know a solution for this?
The text was updated successfully, but these errors were encountered: