tix/tix/test.nix
2024-01-02 13:15:50 +00:00

14 lines
351 B
Nix

path: let
it = import ./it.nix;
describe = import ./describe.nix;
suite = import path;
in
builtins.trace ("testing " + builtins.baseNameOf path)
(
if !builtins.isFunction suite
then throw "A test suite should be in the form { it }: [ <tests> ]."
else {
inherit path;
results = suite {inherit it describe;};
}
)