kit_rs/testing/mod.rs
1//! Testing utilities for Kit framework
2//!
3//! Provides Jest-like testing helpers including:
4//! - `expect!` macro for fluent assertions with clear expected/received output
5//! - `describe!` and `test!` macros for test organization
6//! - `TestDatabase` for isolated database tests
7//! - `TestContainer` for dependency injection in tests
8//!
9//! # Example
10//!
11//! ```rust,ignore
12//! use kit::{describe, test, expect};
13//! use kit::testing::TestDatabase;
14//!
15//! describe!("UserService", {
16//! test!("creates a user", async fn(db: TestDatabase) {
17//! let service = UserService::new();
18//! let user = service.create("test@example.com").await.unwrap();
19//!
20//! expect!(user.email).to_equal("test@example.com".to_string());
21//! });
22//! });
23//! ```
24
25mod expect;
26
27pub use crate::container::testing::{TestContainer, TestContainerGuard};
28pub use crate::database::testing::TestDatabase;
29pub use expect::{set_current_test_name, Expect};