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
Update: componentMocks mocks services injected into the component. I was confused by the name, apparently. Still, leaving the question here in case someone has additional points to make.
The Mocking Components documentation page directs people to use ng-mocks.
The Testing Components documentation page suggests calling createComponentFactory with {componentMocks} to automatically mock components.
Shouldn't that second part either be deprecated or, better yet, change spectator to include ng-mocks as a dependency and then use it for all mocks including components, so developers don't even need to know of or think about ng-mocks?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Update: componentMocks mocks services injected into the component. I was confused by the name, apparently. Still, leaving the question here in case someone has additional points to make.
The Mocking Components documentation page directs people to use ng-mocks.
The Testing Components documentation page suggests calling
createComponentFactory
with{componentMocks}
to automatically mock components.Shouldn't that second part either be deprecated or, better yet, change spectator to include ng-mocks as a dependency and then use it for all mocks including components, so developers don't even need to know of or think about ng-mocks?
Beta Was this translation helpful? Give feedback.
All reactions