Crates.io | turbo-crates |
lib.rs | turbo-crates |
version | 0.0.3 |
source | src |
created_at | 2023-04-13 02:31:25.013813 |
updated_at | 2023-04-19 03:08:12.404337 |
description | A set of useful crates (WIP) |
homepage | |
repository | https://github.com/ariva/turbo-crates.git |
max_upload_size | |
id | 837794 |
size | 3,529 |
A set of useful crates (WIP)
testing_proc_macros
- Used to make testing more predictableInclude:
turbo-crates = { version="0.0.3", features=["testing_proc_macros"] }
use turbo_crates::testing::proc_macros::*;
Use:
#[cfg(test)]
#[safe_tests]
pub(crate) mod test {
const TEST_ENV_VAR: &str = "TEST_ENV_VAR";
#[test]
#[safe_test]
fn main_it_works1() {
std::env::set_var(TEST_ENV_VAR, "test1");
let test_value = std::env::var(TEST_ENV_VAR).unwrap();
assert_eq!(test_value, "test1");
}
// ...
}