Skip to main content

Crate oxidite_testing

Crate oxidite_testing 

Source
Expand description

Testing utilities for Oxidite web applications

This crate provides test helpers, mocks, and utilities for testing Oxidite web applications.

§Examples

use oxidite_testing::*;

#[tokio::test]
async fn test_endpoint() {
    let request = TestRequest::get("/api/users").build();
    // Test your handlers
}

Re-exports§

pub use request::TestRequest;
pub use response::TestResponse;
pub use server::TestServer;
pub use server::test_router;

Modules§

request
response
server

Attribute Macros§

test
Re-export tokio::test for convenience Marks async function to be executed by runtime, suitable to test environment. This macro helps set up a Runtime without requiring the user to use Runtime or Builder directly.