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
If I have a button with a simple onClick$ handler, how might I go about asserting that the QRL was invoked?
The storybook docs recommend you use fn() which returns a spy so in React your test can simply use expect(args.onClick).toHaveBeenCalled(); to verify.
With Qwik, you need to pass QRL's so how can you verify they're invoked? I tried wrapping a spy into a QRL and then asserting the underlying spy was invoked but it never is (assuming that serialization breaks this somehow?).
Is this possible?
The text was updated successfully, but these errors were encountered:
If I have a button with a simple onClick$ handler, how might I go about asserting that the QRL was invoked?
The storybook docs recommend you use
fn()
which returns a spy so in React your test can simply useexpect(args.onClick).toHaveBeenCalled();
to verify.With Qwik, you need to pass QRL's so how can you verify they're invoked? I tried wrapping a spy into a QRL and then asserting the underlying spy was invoked but it never is (assuming that serialization breaks this somehow?).
Is this possible?
The text was updated successfully, but these errors were encountered: