Closed
Description
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.
#[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?
If not, is there any WIP I could help with to make it more succinct?