landsandboat/scripts/specs/test/CSpy.lua
sruon 6b4ef12dca xi_test: LSB test framework
Co-Authored-By: KnowOne134 <35616771+KnowOne134@users.noreply.github.com>
Co-Authored-By: InoUno <774909+InoUno@users.noreply.github.com>
Co-Authored-By: Corey <2593549+cocosolos@users.noreply.github.com>
2025-09-06 00:03:15 -06:00

23 lines
558 B
Lua

---@meta
-- luacheck: ignore 241
---@class CSpy
---@field calls table Array of call records, each containing 'args' and 'returned' fields
local CSpy = {}
---Assert that the spy was called (at least once if no argument, or exactly n times)
---@param times? integer Expected number of calls
---@return nil
function CSpy:called(times)
end
---Assert that the spy was called with the specified arguments
---@param ... any Expected arguments
---@return nil
function CSpy:calledWith(...)
end
---Clear all recorded calls
---@return nil
function CSpy:clear()
end