#sugar #syntactic #readable #bdd #behaviour-driven

bdd-sugar

行为驱动开发语法糖,使测试更易于阅读

1 个不稳定版本

0.1.0 2022年12月2日

716测试

MIT 许可证

3KB

BDD Sugar

Rust语言中使测试更易于阅读的行为驱动开发语法糖

安装

Cargo.toml 中添加

[dev-dependencies]
bdd-sugar = "0.1.0"

示例用法

use bdd_sugar::{given, when, then};

#[test]
#[given(valid email address)]
#[when(filled and pressed forgot password)]
#[then(success toast appears)]
fn forget_password_happy_path_test() {
    // test code
}

无运行时依赖