test

Attribute Macro test 

Source
#[test]
Expand description

A test macro that delegates to the appropriate test framework based on the target architecture.

On wasm32 architecture, it delegates to wasm_bindgen_test::wasm_bindgen_test. On all other architectures, it delegates to tokio::test.

When using with ‘rstest’, ensure any other test invocations come after rstest invocation.

§Example

#[test]
async fn test_something() {
    assert_eq!(2 + 2, 4);
}