-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proposal: adding stubs #1
Comments
OLHA O ERICK AÍ, hahaha!!! E aí mano, beleza? Quanto tempo! 😊 Hey Erick! Correct me if I am wrong: you are propossing to add some classes that provide default implementations, right? Or you want to add some high-order objects (maybe const?) that already provide the implementations for us? |
Opa beleza e por ai? :D The idea is to add some default Stub classes, which are simple mocks that allows us easily check if callbacks were called. In this collection we would have some common cases like That way if someone wants to test if a final stub = VoidStub();
await tester.pumpWidget(GestureDetector(onPressed: stub.onCall, child: Text('tap me'));
await tester.tap(find.text('tap me'));
verify(stub.onCall).called(1); |
Sounds really cool to me! But I wonder if we can go further and also provide some default implementations with some high order const variables, like:
Does it make sense? |
|
Oh I see. Anyway, feel free to open the PR and I will be glad to approve it :) |
Hey,
I have a proposal that was originally sent on the mocktail repo, but after some discussion we decided that it would be better fitted on an external package.
Would this be something that you would be open to be added to this package?
If so I would love to work on a PR adding it.
The text was updated successfully, but these errors were encountered: