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

Cleanup #[cfg(attr)] test annotations for wasm target #1118

Open
insipx opened this issue Oct 4, 2024 · 0 comments
Open

Cleanup #[cfg(attr)] test annotations for wasm target #1118

insipx opened this issue Oct 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@insipx
Copy link
Contributor

insipx commented Oct 4, 2024

rel: rustwasm/wasm-bindgen#4139

Re-iterating issue above:

there should be a better way then repeating

    #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
    #[cfg_attr(not(target_arch = "wasm32"), tokio::test(flavor = "multi_thread"))]

for every single test

maybe a proc macro that is target-aware? ie

#[test(tokio::test)]

where tokio:: is optional, but the attribute becomes [wasm_bindgen] or something

@insipx insipx added the enhancement New feature or request label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant