describe

Macro describe 

Source
describe!() { /* proc-macro */ }
Expand description

Group related tests with a descriptive name

Creates a module containing related tests, similar to Jest’s describe blocks. Supports nesting for hierarchical test organization.

§Example

use kit::{describe, test, expect};
use kit::testing::TestDatabase;

describe!("ListTodosAction", {
    test!("returns empty list when no todos exist", async fn(db: TestDatabase) {
        let action = ListTodosAction::new();
        let todos = action.execute().await.unwrap();
        expect!(todos).to_be_empty();
    });

    // Nested describe for grouping related tests
    describe!("with pagination", {
        test!("returns first page", async fn(db: TestDatabase) {
            // ...
        });
    });
});