-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Hi! I currently have code which looks something like this:
@GenerateMocks(
[AuthenticationRepository, UserRepository],
)
void main() {
...
}
AuthenticationRepository
internally uses User
from the firebase_auth package whereas UserRepository
(and most of the rest of my application) uses my own representation of a user. This currently results in code generation producing something like this:
...
class _FakeUser extends _i1.Fake implements _i2.User {
@override
String toString() => super.toString();
}
...
class _FakeUser extends _i1.Fake implements _i5.User {}
...
Which gives me this error when trying to run the code: Error: Can't use '_FakeUser' because it is declared more than once.
I've tried adding customMocks: [MockSpec<firebase.User>(as: #FirebaseUser)
which does generate the FirebaseUser
class but it is not used by the AuthenticationRepository
mock. Is there any way to solve this?
fredumazy-itp
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)