-
const funcInput = () => '123';
fixture = MockRender(TestComponent, {
funcInput
});I believe Is it possible to pass a function input in MockRender |
Beta Was this translation helpful? Give feedback.
Answered by
satanTime
Nov 15, 2023
Replies: 1 comment 3 replies
-
|
Hi @cheng93, that's not true. If |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
cheng93
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @cheng93,
that's not true.
funcInputwill be set as@Inputor@OutputofTestComponentonly whenTestComponenthas such an input or output.If
TestComponenthas neither, then nothing will be done withfuncInput.if
TestComponenthas@Input() funcInput, thenthis.funcInputwill be the function.if
TestComponenthas@Output() funcInput, thenfuncInputwill be triggered on emits ofthis.funcInput.