07c24987f2
Any change to the app defaults can introduce new updates, all that really needs to be tested is if any update happened. |
||
---|---|---|
.. | ||
build | ||
Cargo.toml | ||
README.md | ||
command.rs | ||
config.rs | ||
focus.rs | ||
image.rs | ||
text.rs | ||
var.rs |
README.md
Tests
Use this directory for integration, build tests or any test that is not a unit test.
Running
Use cargo do test -t command
to run tests in the ./command.rs
file.
Use cargo do test -b *
to run all build tests.
Use cargo do test -b property/*
to run build test cases that match the path relative to ./build/cases
.
Adding an Integration Test
To add an integration test, create a file then add it in ./Cargo.toml
as a [[bin]]
.
In ./foo.rs
:
use zng::prelude::*;
#[test]
fn foo() {
assert!(true);
}
Then add in ./Cargo.toml
:
[[test]]
name = "foo"
path = "foo.rs"
Then run from the project root using cargo do test -t foo
.