tests: allow test cases to use the nixvim helpers (for testing them)

This commit is contained in:
Gaetan Lepage 2023-09-27 10:43:23 +02:00 committed by Gaétan Lepage
parent 11b22bab05
commit 9e448b7ff0
10 changed files with 12 additions and 11 deletions

View file

@ -35,6 +35,7 @@
# 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,
@ -42,8 +43,8 @@
if builtins.isAttrs cases if builtins.isAttrs cases
then args then args
else { else {
# cases = cases {inherit pkgs;}; # cases is a function
cases = cases {inherit pkgs;}; cases = cases {inherit pkgs helpers;};
inherit namespace; inherit namespace;
}) })
testsList; testsList;

View file

@ -1,4 +1,4 @@
{pkgs}: { {pkgs, ...}: {
"40" = { "40" = {
plugins = { plugins = {
nix.enable = true; nix.enable = true;

View file

@ -1,4 +1,4 @@
{pkgs}: { {pkgs, ...}: {
plain = {}; plain = {};
simple-plugin = { simple-plugin = {

View file

@ -1,4 +1,4 @@
{pkgs}: { {
example-with-str = { example-with-str = {
clipboard = { clipboard = {
register = "unnamed"; register = "unnamed";

View file

@ -1,4 +1,4 @@
{pkgs}: { {pkgs, ...}: {
example = { example = {
plugins.nvim-jdtls = { plugins.nvim-jdtls = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
{pkgs}: { {
empty = { empty = {
plugins = { plugins = {
treesitter.enable = true; treesitter.enable = true;

View file

@ -1,4 +1,4 @@
{pkgs}: { {
empty = { empty = {
plugins.treesitter.enable = true; plugins.treesitter.enable = true;
}; };

View file

@ -1,4 +1,4 @@
{pkgs}: { {pkgs, ...}: {
empty = { empty = {
plugins.lsp.enable = true; plugins.lsp.enable = true;
}; };

View file

@ -1,4 +1,4 @@
{pkgs}: { {pkgs, ...}: {
empty = { empty = {
plugins.lualine.enable = true; plugins.lualine.enable = true;
}; };

View file

@ -1,4 +1,4 @@
{pkgs}: { {
empty = { empty = {
plugins.alpha.enable = true; plugins.alpha.enable = true;
}; };