Skip to content

fix: updated types to better reflect current luassert#7

Open
eliw00d wants to merge 1 commit intoLuaCATS:mainfrom
eliw00d:fix/types
Open

fix: updated types to better reflect current luassert#7
eliw00d wants to merge 1 commit intoLuaCATS:mainfrom
eliw00d:fix/types

Conversation

@eliw00d
Copy link
Copy Markdown

@eliw00d eliw00d commented Apr 2, 2026

spy.d.lua

  • Fixed typo ---@pasram → ---@param (line 32)

stub.lua — major rewrite to match the actual source:

  • Added luassert.stub.oncall class (returned by on_call_with) with returns(...) and invokes(func)
  • Added luassert.stub.by_default class with returns(...) and invokes(func)
  • Added luassert.stub class (extends luassert.spy) with the missing methods: returns(...), invokes(func), on_call_with(...), and by_default
  • Changed the return type of stub.new() from luassert.spy to luassert.stub

mock.lua

  • Added mock.clear(object) — was in the source but missing from types
  • Added mock.revert(object) — was in the source but missing from types

match.lua

  • Fixed match.is.True = match.False → match.is.False = match.False (copy-paste bug)

@eliw00d
Copy link
Copy Markdown
Author

eliw00d commented Apr 2, 2026

@sumneko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant