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
#313 changes DartySocket extension to access this.io. This makes me unable to mock Socket as described in mockito FAQ.
I'm using DartySocket.onError, and because mockito doesn't support deep stubbing when accessing io it throws the following.
FakeUsedError (FakeUsedError: 'io'
No stub was found which matches the argument of this method call:
io
A fake object was created for this call, in the hope that it won't be ever accessed.
Here is the stack trace where 'io' was called:
#0 new SmartFake (package:mockito/src/mock.dart:235:41)
#1 new _FakeManager_3 (file:///Users/jeiea/Documents/app/test/utils/test_utils.mocks.dart:105:7)
#2 MockSocket.io (file:///Users/jeiea/Documents/app/test/utils/test_utils.mocks.dart:1140:36)
#3 DartySocket.onError (package:socket_io_client/src/darty.dart:31:10)
I thought some workarounds and maybe I can bypass this by making new interface, but can it be redesigned to support mocking easily if it is possible?
The text was updated successfully, but these errors were encountered:
#313 changes
DartySocket
extension to accessthis.io
. This makes me unable to mockSocket
as described in mockito FAQ.I'm using
DartySocket.onError
, and because mockito doesn't support deep stubbing when accessingio
it throws the following.I thought some workarounds and maybe I can bypass this by making new interface, but can it be redesigned to support mocking easily if it is possible?
The text was updated successfully, but these errors were encountered: