Skip to main content

Crate dnet_tests

Crate dnet_tests 

Source
Expand description

Common tests for dnet transport implementations.

Macros§

dtest_configure
Configure WASM tests to run in browser. Configure WASM tests to run in browser.

Functions§

init_logging
Init tracing subscriber and enable logging for given transports.
test_stream
Test transport by collecting received messages while treating transport as a stream.
test_stream_with_sleep_before_drop
Same as test_stream except we sleep for specified duration before dropping the sending transport.
test_transport
Test transport by sending strings and integers between two connected instances.
test_unit_message
Test transport by sending units (()) between two connected instances.

Attribute Macros§

dtest
Convenience attribute macro for marking tests that need to run for both native and WASM targets. Convert test into two tests for WASM (using wasm-bindgen-test) and non-WASM targets (using tokio::test).