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