-
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.
funcInput
will be set as@Input
or@Output
ofTestComponent
only whenTestComponent
has such an input or output.If
TestComponent
has neither, then nothing will be done withfuncInput
.if
TestComponent
has@Input() funcInput
, thenthis.funcInput
will be the function.if
TestComponent
has@Output() funcInput
, thenfuncInput
will be triggered on emits ofthis.funcInput
.