# HG changeset patch # User Matthew Wild # Date 1521238773 0 # Node ID a2e6caf5848db70c2c6a556b8894c92de90f7ff0 # Parent 62bb06cf8a43fab832b5776165d84470971f4338 util.async: Add test to ensure waiters throw an error outside async contexts diff -r 62bb06cf8a43 -r a2e6caf5848d spec/util_async_spec.lua --- a/spec/util_async_spec.lua Fri Mar 16 17:50:16 2018 +0000 +++ b/spec/util_async_spec.lua Fri Mar 16 22:19:33 2018 +0000 @@ -84,6 +84,11 @@ 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;