diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-03-16 22:19:33 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-03-16 22:19:33 +0000 |
commit | 2f1f98e1b5cd5dac6fb792ab34da7b767ffa8cd1 (patch) | |
tree | 5ca774b1ce40ca176db722675b77d7ad5d5104f1 | |
parent | b0211d2247a32a4fb963bb1e6d4d6c6fec6cbf52 (diff) | |
download | prosody-2f1f98e1b5cd5dac6fb792ab34da7b767ffa8cd1.tar.gz prosody-2f1f98e1b5cd5dac6fb792ab34da7b767ffa8cd1.zip |
util.async: Add test to ensure waiters throw an error outside async contexts
-rw-r--r-- | spec/util_async_spec.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/util_async_spec.lua b/spec/util_async_spec.lua index 24f2efdb..67438595 100644 --- a/spec/util_async_spec.lua +++ b/spec/util_async_spec.lua @@ -84,6 +84,11 @@ describe("util.async", function() end); end); describe("#waiter", function() + it("should error outside of async context", function () + assert.has_error(function () + async.waiter(); + end); + end); it("should work", function () local wait, done; |