Powered by
Mocking injected items in Angular component test.
# i-need-help
f
fancy-mechanic-10638
04/25/2023, 4:19 PM
I'm sure this is an FAQ, but I just can't find it. When I'm doing a component test, and my component does something like
readonly #service = inject(MyService)
, how do I mock the service? I'm specifically not talking about mocking an HTTP call.
Previous
Next