add TSamFile and TSamAll command with default keymaps

This commit is contained in:
2025-12-23 23:35:40 +01:00
parent 463d0ae2f7
commit 61f9a7dcb4
8 changed files with 281 additions and 41 deletions

View File

@@ -1,7 +1,7 @@
local test_samurai = require("test-samurai")
local core = require("test-samurai.core")
describe("test-samurai output API", function()
describe("test-samurai public API", function()
it("delegates show_output to core", function()
local called = false
local orig = core.show_output
@@ -16,4 +16,49 @@ describe("test-samurai output API", function()
assert.is_true(called)
end)
it("delegates test_nearest to core.run_nearest", function()
local called = false
local orig = core.run_nearest
core.run_nearest = function()
called = true
end
test_samurai.test_nearest()
core.run_nearest = orig
assert.is_true(called)
end)
it("delegates test_file to core.run_file", function()
local called = false
local orig = core.run_file
core.run_file = function()
called = true
end
test_samurai.test_file()
core.run_file = orig
assert.is_true(called)
end)
it("delegates test_all to core.run_all", function()
local called = false
local orig = core.run_all
core.run_all = function()
called = true
end
test_samurai.test_all()
core.run_all = orig
assert.is_true(called)
end)
end)