Expand description
Testing utilities for Kit framework
Provides Jest-like testing helpers including:
expect!macro for fluent assertions with clear expected/received outputdescribe!andtest!macros for test organizationTestDatabasefor isolated database testsTestContainerfor dependency injection in tests
§Example
ⓘ
use kit::{describe, test, expect};
use kit::testing::TestDatabase;
describe!("UserService", {
test!("creates a user", async fn(db: TestDatabase) {
let service = UserService::new();
let user = service.create("test@example.com").await.unwrap();
expect!(user.email).to_equal("test@example.com".to_string());
});
});Re-exports§
pub use crate::container::testing::TestContainer;pub use crate::container::testing::TestContainerGuard;pub use crate::database::testing::TestDatabase;
Structs§
- Expect
- The main Expect wrapper for fluent assertions
Functions§
- set_
current_ test_ name - Set the current test name (called by test! macro)