-
I created a reproduction here: I declared a ngMocks.defaultMock inside the test.ts but its not working. When you move the code block above the describe inside the test.spec.ts, its working. Am I doing something wrong here or is this a bug? |
Beta Was this translation helpful? Give feedback.
Answered by
satanTime
Jan 16, 2023
Replies: 1 comment 5 replies
-
Hi, you shouldn't import from spec files. If you need to define something in the spec file, then defaultMock should be there too. An example is TitleStrategy above in the code. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
satanTime
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
you shouldn't import from spec files.
If you need to define something in the spec file, then defaultMock should be there too.
An example is TitleStrategy above in the code.