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:
parent
12fd9ee1c8
commit
824e048096
67 changed files with 71 additions and 77 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue