Toggle menu
14
236
69
27.4K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Lua-mock/Spy: Revision history

From Kenshi Wiki

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

26 February 2025

  • curprev 05:3605:36, 26 February 2025 Prd talk contribs 4,194 bytes +4,194 Created page with "--- @classmod Spy --- Wraps a function and records the calls. -- For each call the arguments and return values are saved. local ValueMatcher = require 'Module:Lua-mock/ValueMatcher' local Spy = {} Spy.__index = Spy function Spy:__call( ... ) local returnValues = { self.wrappedFn(...) } local call = { arguments = {...}, returnValues = returnValues } table.insert(self.calls, call) return unpack(returnValues) end function Spy:reset..."