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
MockFunction allows you to mock repeated calls, but it means at least one call. That makes sense in most of the polling contexts it is being used for. But it doesn't make sense in all environments. For example, with USB mocking, we are mocking the USB status every time it is mock inserted or mock removed. But the status must be polled between each insert or remove so the MockFunction state can progress to the next mocked value. I think it's very confusing and problematic that the success or failure of the test can depend on whether we write an assertion or not (the backend itself is not polling).
We should either:
Enable "0 or more" repeated calls via MockFunction
Just use jest functions for the MockUsbDrive
The text was updated successfully, but these errors were encountered:
MockFunction
allows you to mock repeated calls, but it means at least one call. That makes sense in most of the polling contexts it is being used for. But it doesn't make sense in all environments. For example, with USB mocking, we are mocking the USB status every time it is mock inserted or mock removed. But the status must be polled between each insert or remove so theMockFunction
state can progress to the next mocked value. I think it's very confusing and problematic that the success or failure of the test can depend on whether we write an assertion or not (the backend itself is not polling).We should either:
MockFunction
jest
functions for theMockUsbDrive
The text was updated successfully, but these errors were encountered: