-
Notifications
You must be signed in to change notification settings - Fork 46
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
Test Helpers #70
Comments
Hi @ryanhanks Thanks for the suggestion! Indeed, This is definitely something planned for the near future. Meanwhile, if anyone has any suggestions feel free to leave a comment here 👍 |
We use those in our project. Matcher isLeft<T>(
final Matcher? leftMatcher,
) => ...
Matcher isRight<T>(
final Matcher? rightMatcher,
)
Matcher isSome<T>(
final Matcher? someMatcher,
) => ...
Matcher isNone => ... We use them like so: expect(
inAppPurchasePayment.subscriptionServiceApiBuilder,
isNone,
);
expect(
inAppPurchasePayment.subscriptionServiceApiBuilder,
isSome<SubscriptionV2ControllerApiBuilder>(),
);
expect(
inAppPurchasePayment.subscriptionServiceApiBuilder,
isSome<SubscriptionV2ControllerApiBuilder>(
predicate(
(final SubscriptionV2ControllerApiBuilder builder) => builder == exampleBuilder,
),
),
); |
@zellidev0 I already set up a fpdart_test package folder. The plan would be to add a separate testing library for fpdart. I think the methods you propose may come handy once |
Hey @SandroMaglione any update on the test package? Specially looking for unwrapping data from TaskEither to |
Hey @SAGARSURI A possible fpdart v2 is currently work in progress (#147). This will bring many changes, so I think it's better to wait for v2 before starting the work on support tooling (tests, linting) |
Any plans to provide test helpers? Something like https://pub.dev/packages/dartz_test maybe?
The text was updated successfully, but these errors were encountered: