zng/tests
Samuel Guerra 07c24987f2 Remove "expected one update" from var integration tests.
Any change to the app defaults can introduce new updates, all that really needs to be tested is if any update happened.
2024-04-04 13:45:09 -03:00
..
build Changed version of every crate to 0.2.0. 2024-03-30 17:30:08 -03:00
Cargo.toml Changed version of every crate to 0.2.0. 2024-03-30 17:30:08 -03:00
README.md Changed instances of 'zero_ui' to 'zng'. 2024-03-26 21:12:13 -03:00
command.rs Changed instances of 'zero_ui' to 'zng'. 2024-03-26 21:12:13 -03:00
config.rs Changed instances of 'zero_ui' to 'zng'. 2024-03-26 21:12:13 -03:00
focus.rs Changed instances of 'zero_ui' to 'zng'. 2024-03-26 21:12:13 -03:00
image.rs Changed instances of 'zero_ui' to 'zng'. 2024-03-26 21:12:13 -03:00
text.rs Changed instances of 'zero_ui' to 'zng'. 2024-03-26 21:12:13 -03:00
var.rs Remove "expected one update" from var integration tests. 2024-04-04 13:45:09 -03:00

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.