12 lines
333 B
Nix
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;})
|
|
)
|