diff --git a/plugins/by-name/mini-test/default.nix b/plugins/by-name/mini-test/default.nix new file mode 100644 index 00000000..7a94a553 --- /dev/null +++ b/plugins/by-name/mini-test/default.nix @@ -0,0 +1,27 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "mini-test"; + moduleName = "mini.test"; + + maintainers = [ lib.maintainers.HeitorAugustoLN ]; + + settingsExample = { + collect = { + emulate_busted = true; + find_files = lib.nixvim.nestedLiteralLua '' + function() + return vim.fn.globpath('tests', '**/test_*.lua', true, true) + end + ''; + filter_cases = lib.nixvim.nestedLiteralLua "function(case) return true end"; + }; + + execute = { + reporter = lib.nixvim.nestedLiteralLua "nil"; + stop_on_error = false; + }; + + script_path = "scripts/minitest.lua"; + silent = false; + }; +} diff --git a/tests/test-sources/plugins/by-name/mini-test/default.nix b/tests/test-sources/plugins/by-name/mini-test/default.nix new file mode 100644 index 00000000..16f35c1e --- /dev/null +++ b/tests/test-sources/plugins/by-name/mini-test/default.nix @@ -0,0 +1,31 @@ +{ lib, ... }: +{ + empty = { + plugins.mini-test.enable = true; + }; + + defaults = { + plugins.mini-test = { + enable = true; + settings = { + collect = { + emulate_busted = true; + find_files = lib.nixvim.mkRaw '' + function() + return vim.fn.globpath('tests', '**/test_*.lua', true, true) + end + ''; + filter_cases = lib.nixvim.mkRaw "function(case) return true end"; + }; + + execute = { + reporter = lib.nixvim.mkRaw "nil"; + stop_on_error = false; + }; + + script_path = "scripts/minitest.lua"; + silent = false; + }; + }; + }; +}