We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In image-rs/imageproc#386 I am extending https://github.com/image-rs/imageproc to have wasm tests by re-using the existing tests. The way I am doing this is based on this post, https://www.reddit.com/r/rust/comments/a80rst/pure_wasm_crate_testing/ec8q9r3/ i.e.
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)] fn test_connected_components_eight_white_background() { ... }
However, this is verbose compared to #[test]. Given the above post was 8 months ago, is there now a better way to do this?
#[test]
If not, is there any WIP I could help with to make it more succinct?
The text was updated successfully, but these errors were encountered:
Currently there's not a less verbose way of doing this, but I agree that there should be! I'm not entirely sure what this would look like though
Sorry, something went wrong.
Maybe it would be nice if something like #[wasm_bindgen_test(also_non_wasm)] worked.
#[wasm_bindgen_test(also_non_wasm)]
Addressed by #4150.
In the next breaking change we should probably do the reverse: by default apply test and add an option to opt-out.
test
No branches or pull requests
Summary
In image-rs/imageproc#386 I am extending https://github.com/image-rs/imageproc to have wasm tests by re-using the existing tests. The way I am doing this is based on this post, https://www.reddit.com/r/rust/comments/a80rst/pure_wasm_crate_testing/ec8q9r3/ i.e.
However, this is verbose compared to
#[test]
. Given the above post was 8 months ago, is there now a better way to do this?If not, is there any WIP I could help with to make it more succinct?
The text was updated successfully, but these errors were encountered: