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

Remove module needed for wasm workaround for rstest #1484

Open
keks opened this issue Jan 25, 2024 · 1 comment
Open

Remove module needed for wasm workaround for rstest #1484

keks opened this issue Jan 25, 2024 · 1 comment

Comments

@keks
Copy link
Contributor

keks commented Jan 25, 2024

The rstest crate allows using macro attributes other than #[test], but it does require them to have the last element of the module path to be named "test" (e.g. #[foo::test]). However, for wasm it is called wasm_bindgen_test. In order to get rstest to accept it, we have a private module that reexports it using the name test. That way, we can use it in rstest tests.

More context: la10736/rstest#211 (comment)
Private workaround module:

openmls/openmls/src/lib.rs

Lines 194 to 198 in 1412c62

// this is a workaround, see https://github.com/la10736/rstest/issues/211#issuecomment-1701238125
#[cfg(any(test, feature = "test-utils"))]
pub mod wasm {
pub use wasm_bindgen_test::wasm_bindgen_test as test;
}

@keks keks added bug Something isn't working tests blocked Not actionable not actionable wasm labels Jan 25, 2024
@franziskuskiefer
Copy link
Contributor

We should revisit this together with the custom test framework in the libcrux PR.

@raphaelrobert raphaelrobert removed the bug Something isn't working label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants