diff --git a/library/busted.lua b/library/busted.lua index 10c06d6..37864b7 100644 --- a/library/busted.lua +++ b/library/busted.lua @@ -4,38 +4,24 @@ assert = require("luassert") spy = require("luassert.spy") stub = require("luassert.stub") mock = require("luassert.mock") +match = require("luassert.match") ---Undocumented feature with unknown purpose. ---@param filename string function file(filename) end ----Mark a test as placeholder. +---Mark a test as pending (placeholder). --- ----This will not fail or pass, it will simply be marked as "pending". ----@param name string ----@param block fun() -function pending(name, block) end - ----Define the start of an asynchronous test. ---- ----Call `done()` at the end of your test to complete it. +---When called as a statement inside a test, marks the current test as pending. +---When called as a block descriptor, registers a pending test node. --- ----## Example ----``` ----it("Makes an http request", function() ---- async() ---- http.get("https://github.com", function() ---- print("Got Website!") ---- done() ---- end) ----end) ----``` -function async() end +---This will not fail or pass, it will simply be marked as "pending". +---@param name? string +function pending(name) end ----Mark the end of an asynchronous test. ---- ----Should be paired with a call to `async()`. -function done() end +---Immediately fail the current test with a message. +---@param message string +function fail(message) end ---Used to define a set of tests. Can be nested to define sub-tests. ---