local test_samurai = require("test-samurai") local core = require("test-samurai.core") local config = require("test-samurai.config") describe("test-samurai core (no bundled runners)", function() before_each(function() test_samurai.setup() end) it("defaults to an empty runner_modules list", function() local cfg = config.get() assert.is_true(type(cfg.runner_modules) == "table") assert.equals(0, #cfg.runner_modules) end) it("warns when no runner is installed for a test file", function() local notified = {} local orig_notify = vim.notify vim.notify = function(msg, level) table.insert(notified, { msg = msg, level = level }) end local bufnr = vim.api.nvim_create_buf(false, true) vim.api.nvim_buf_set_name(bufnr, "/tmp/no_runner_test.go") vim.bo[bufnr].filetype = "go" vim.api.nvim_set_current_buf(bufnr) core.run_nearest() vim.notify = orig_notify assert.equals(1, #notified) assert.equals("[test-samurai] no runner installed for this kind of test", notified[1].msg) end) end)