tests: remove special case for efmls-configs

This commit is contained in:
Matt Sturgeon 2024-08-22 11:31:57 +01:00
parent 06419627e2
commit 087f70cb0a
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 95 additions and 98 deletions

View file

@ -41,21 +41,8 @@ let
testsList = lib.lists.flatten (parseDirectories root [ ]);
testsListEvaluated = builtins.map (
{ cases, namespace }@args:
if builtins.isAttrs cases then
args
else
{
# cases is a function
cases = cases {
inherit pkgs helpers;
efmls-options = import ../plugins/lsp/language-servers/efmls-configs.nix {
inherit pkgs lib helpers;
config = { };
};
};
inherit namespace;
}
{ cases, ... }@args:
if builtins.isFunction cases then args // { cases = cases { inherit pkgs lib helpers; }; } else args
) testsList;
# Take a list of test cases (i.e the content of a file) and prepare a test case that can be