tix/tix/test.nix
2024-12-08 21:27:18 +00:00

12 lines
333 B
Nix

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