From 2f1f98e1b5cd5dac6fb792ab34da7b767ffa8cd1 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 16 Mar 2018 22:19:33 +0000 Subject: util.async: Add test to ensure waiters throw an error outside async contexts --- spec/util_async_spec.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec') 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; -- cgit v1.2.3