Skip to content
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

Testing async-infected code #4

Closed
Maykeye opened this issue Jul 5, 2022 · 2 comments
Closed

Testing async-infected code #4

Maykeye opened this issue Jul 5, 2022 · 2 comments

Comments

@Maykeye
Copy link

Maykeye commented Jul 5, 2022

Currently the catchr uses #[test] to mark tests.

Which is good for usual tests, but async is so contagious that even tests are affected.

For async code (with tokio in my case) common way is to use #[tokio::test] instead of #[test] (and other runtimes have similar, eg actix_rt::test).

Can we have support for that?

@Dzejkop
Copy link
Owner

Dzejkop commented Jul 6, 2022

Hey, definitely.

I've actually been working on a larger refactoring which would've included async support.

But now I think I can add this feature standalone.

I'll probably take a stab at it over the weekend, but I'm not making any promises.

@Dzejkop
Copy link
Owner

Dzejkop commented Jul 23, 2022

Hey added support for #[tokio::test] with the usage of describe_tokio! hope this serves your needs.

@Dzejkop Dzejkop closed this as completed Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants