Also, playing around with it, and I should made this explicit, it was a little of a TIL moment.
You check the parameters of WeirdComponent, you have hook and then hook2 taking hook as an argument for it's hook.
It works in this order, but if you change the order it stops working.
And this is JS for you =D
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yuck.
I would much rather stub the hook. Either that or build smaller components that make more sense for strict “unit” testing.
Hey... I agree with you. But it's... something.
Also, playing around with it, and I should made this explicit, it was a little of a TIL moment.
You check the parameters of
WeirdComponent, you havehookand thenhook2takinghookas an argument for it's hook.It works in this order, but if you change the order it stops working.
And this is JS for you =D