2024-01-02 13:15:50 +00:00
|
|
|
{
|
|
|
|
describe,
|
|
|
|
it,
|
|
|
|
...
|
|
|
|
}: let
|
2024-01-02 12:44:07 +00:00
|
|
|
test = import ../tix/test.nix;
|
2024-01-03 10:14:28 +00:00
|
|
|
in [
|
|
|
|
(describe "the test function" [
|
2024-01-02 13:15:50 +00:00
|
|
|
(it "get's test results" {
|
|
|
|
expected = [
|
|
|
|
{
|
2024-01-03 10:14:28 +00:00
|
|
|
"component" = "it";
|
|
|
|
results = [
|
|
|
|
{
|
|
|
|
"msg" = "test's itself???";
|
|
|
|
"success" = true;
|
|
|
|
}
|
|
|
|
];
|
2024-01-02 13:15:50 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
actual = (test ./it.test.nix).results;
|
|
|
|
})
|
|
|
|
(it "has a path" {
|
|
|
|
actual = builtins.typeOf (test ./it.test.nix).path;
|
|
|
|
expected = "path";
|
|
|
|
})
|
|
|
|
(it "fails to build non test" {
|
|
|
|
actual = test ./bad/string.nix;
|
|
|
|
throws = true;
|
|
|
|
})
|
2024-01-03 10:14:28 +00:00
|
|
|
])
|
|
|
|
]
|