Skip to main content

test

Attribute Macro test 

Source
#[test]
Expand description

A macro that wraps a test function and makes sure the postgres test database(s) are dropped after the test completes/panics.

Usage:

#[tokio::test]
#[pubky_testnet::test]
async fn test_function() {
    // test code
}

Important: The test function must be async and #[tokio::test] must be present above the macro.