1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-26 20:21:03 +01:00

tests/fetch-tests: only apply required args

Using `functionArgs` and `intersectAttrs`, apply only the required args
to test module files.
This commit is contained in:
Matt Sturgeon 2025-11-24 08:18:30 +00:00
parent 12fd9ee1c8
commit 824e048096
67 changed files with 71 additions and 77 deletions

View file

@ -15,7 +15,11 @@ let
cases =
if builtins.isFunction fnOrAttrs then
# Call the function
fnOrAttrs { inherit pkgs lib; }
fnOrAttrs (
builtins.intersectAttrs (builtins.functionArgs fnOrAttrs) {
inherit pkgs lib;
}
)
else
fnOrAttrs;
};