rework describe function
This commit is contained in:
parent
f125ec4c31
commit
2df95bbc56
7 changed files with 77 additions and 52 deletions
|
@ -2,20 +2,24 @@
|
|||
describe,
|
||||
it,
|
||||
...
|
||||
}:
|
||||
describe "the describe function" [
|
||||
(it "returns an array with the message changed" {
|
||||
expected = [
|
||||
{
|
||||
success = true;
|
||||
msg = "the describe function: works";
|
||||
}
|
||||
];
|
||||
actual = describe "the describe function" [
|
||||
{
|
||||
success = true;
|
||||
msg = "works";
|
||||
}
|
||||
];
|
||||
})
|
||||
}: [
|
||||
(describe "the describe function" [
|
||||
(it "returns an array with the message changed" {
|
||||
expected = {
|
||||
component = "the describe function";
|
||||
results = [
|
||||
{
|
||||
success = true;
|
||||
msg = "works";
|
||||
}
|
||||
];
|
||||
};
|
||||
actual = describe "the describe function" [
|
||||
{
|
||||
success = true;
|
||||
msg = "works";
|
||||
}
|
||||
];
|
||||
})
|
||||
])
|
||||
]
|
||||
|
|
|
@ -2,16 +2,17 @@
|
|||
it,
|
||||
describe,
|
||||
...
|
||||
}:
|
||||
describe "it" [
|
||||
(it "test's itself???" rec {
|
||||
expected = {
|
||||
success = true;
|
||||
msg = "test's itself???";
|
||||
};
|
||||
actual = it "test's itself???" {
|
||||
expected = expected;
|
||||
actual = expected;
|
||||
};
|
||||
})
|
||||
}: [
|
||||
(describe "it" [
|
||||
(it "test's itself???" rec {
|
||||
expected = {
|
||||
success = true;
|
||||
msg = "test's itself???";
|
||||
};
|
||||
actual = it "test's itself???" {
|
||||
expected = expected;
|
||||
actual = expected;
|
||||
};
|
||||
})
|
||||
])
|
||||
]
|
||||
|
|
|
@ -4,13 +4,18 @@
|
|||
...
|
||||
}: let
|
||||
test = import ../tix/test.nix;
|
||||
in
|
||||
describe "the test function" [
|
||||
in [
|
||||
(describe "the test function" [
|
||||
(it "get's test results" {
|
||||
expected = [
|
||||
{
|
||||
"msg" = "it: test's itself???";
|
||||
"success" = true;
|
||||
"component" = "it";
|
||||
results = [
|
||||
{
|
||||
"msg" = "test's itself???";
|
||||
"success" = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
actual = (test ./it.test.nix).results;
|
||||
|
@ -23,4 +28,5 @@ in
|
|||
actual = test ./bad/string.nix;
|
||||
throws = true;
|
||||
})
|
||||
]
|
||||
])
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue