mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
tests: do not import helpers.nix directly
This commit is contained in:
parent
304c62516d
commit
a121d96091
4 changed files with 7 additions and 5 deletions
|
@ -3,13 +3,14 @@
|
|||
pkgs,
|
||||
config,
|
||||
system,
|
||||
helpers,
|
||||
makeNixvimWithModuleUnfree,
|
||||
makeNixvimWithModule,
|
||||
...
|
||||
}: {
|
||||
checks = {
|
||||
tests = import ../tests {
|
||||
inherit pkgs;
|
||||
inherit pkgs helpers;
|
||||
inherit (pkgs) lib;
|
||||
makeNixvim = configuration:
|
||||
makeNixvimWithModuleUnfree {
|
||||
|
@ -25,7 +26,7 @@
|
|||
};
|
||||
|
||||
lib-tests = import ../tests/lib-tests.nix {
|
||||
inherit pkgs;
|
||||
inherit pkgs helpers;
|
||||
inherit (pkgs) lib;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
makeNixvim,
|
||||
lib,
|
||||
helpers,
|
||||
pkgs,
|
||||
}: let
|
||||
fetchTests = import ./fetch-tests.nix;
|
||||
|
@ -9,7 +10,7 @@
|
|||
|
||||
# List of files containing configurations
|
||||
testFiles = fetchTests {
|
||||
inherit lib pkgs;
|
||||
inherit lib pkgs helpers;
|
||||
root = ./test-sources;
|
||||
};
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
root,
|
||||
lib,
|
||||
pkgs,
|
||||
helpers,
|
||||
}: let
|
||||
# Handle an entry from readDir and either extract the configuration if its a regular file,
|
||||
# or continue to recurse if it's a directory. While recursing maintain a list of the traversed
|
||||
|
@ -35,7 +36,6 @@
|
|||
# Remove the nesting
|
||||
testsList = lib.lists.flatten (parseDirectories root []);
|
||||
|
||||
helpers = import ../lib/helpers.nix {inherit lib;};
|
||||
testsListEvaluated = builtins.map ({
|
||||
cases,
|
||||
namespace,
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
helpers,
|
||||
}: let
|
||||
helpers = import ../lib/helpers.nix {inherit lib pkgs;};
|
||||
results = pkgs.lib.runTests {
|
||||
testToLuaObject = {
|
||||
expr = helpers.toLuaObject {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue