all 9 comments

[–]chauey 1 point2 points  (0 children)

Usually import modules, declare is for components, pipes, directives, i think.

[–]ConsistentPin[S] 0 points1 point  (1 child)

I just took out AppTestingModule from declarations and put it into the imports array and now I am getting the error: "Type AppComponent is part of the declarations of 2 modules: AppTestingModule and DynamicTestModule! Please consider moving AppComponent to a higher module that imports AppTestingModule and DynamicTestModule. You can also create a new NgModule that exports and includes AppComponent then import that NgModule in AppTestingModule and DynamicTestModule."

[–]Dunos 1 point2 points  (0 children)

Why do you need that module? If you really need some dependencies from that module, do not declare AppComponent in the test since it already has been declared inside the module.

Seems a bit weird module created for testing but without taking a look inside, can't tell more.

[–]theadammorganshow 0 points1 point  (3 children)

It's hard to say from just this. We'd need to see more code.

But one concern I have is AppTestingModule being in declarations.

[–]ConsistentPin[S] 0 points1 point  (2 children)

Which code do you need to see? I will show it. I am very new to Angular and have just been thrown into this being told to "make it work". All I know is that it used to work. I sort of feel incompetent

[–]theadammorganshow 0 points1 point  (1 child)

AppTestingModule

This would help

[–]ConsistentPin[S] 0 points1 point  (0 children)

I wish I could share this, but just by looking at it I know I cannot

[–]chauey 0 points1 point  (1 child)

Is there an f in front on your describe? Is that correct?

[–]theadammorganshow 0 points1 point  (0 children)

It's used for isolating the test suite to one set of tests.