diff options
-rw-r--r-- | spec/util_async_spec.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/util_async_spec.lua b/spec/util_async_spec.lua index f7e469c9..7c1696b5 100644 --- a/spec/util_async_spec.lua +++ b/spec/util_async_spec.lua @@ -602,5 +602,13 @@ describe("util.async", function() async.once(f); assert.spy(f).was.called(); end); + it("should propagate errors", function () + local function should_error() + async.once(function () + error("hello world"); + end); + end; + assert.error_matches(should_error, "hello world"); + end); end); end); |