55
66local lookups = {
77 util = " neoplen.async.util" ,
8- tests = " neoplen.async.tests" ,
98 control = " neoplen.async.control" ,
109}
1110
12- local exports = setmetatable (require " neoplen.async.async" , {
11+ local M = setmetatable (require " neoplen.async.async" , {
1312 __index = function (t , k )
1413 local require_path = lookups [k ]
1514 if not require_path then
@@ -23,32 +22,4 @@ local exports = setmetatable(require "neoplen.async.async", {
2322 end ,
2423})
2524
26- exports .tests .add_globals = function ()
27- a = exports
28-
29- -- must prefix with a or stack overflow, plenary.test harness already added it
30- a .describe = exports .tests .describe
31- -- must prefix with a or stack overflow
32- a .it = exports .tests .it
33- a .pending = exports .tests .pending
34- a .before_each = exports .tests .before_each
35- a .after_each = exports .tests .after_each
36- end
37-
38- exports .tests .add_to_env = function ()
39- local env = getfenv (2 )
40-
41- env .a = exports
42-
43- -- must prefix with a or stack overflow, plenary.test harness already added it
44- env .a .describe = exports .tests .describe
45- -- must prefix with a or stack overflow
46- env .a .it = exports .tests .it
47- env .a .pending = exports .tests .pending
48- env .a .before_each = exports .tests .before_each
49- env .a .after_each = exports .tests .after_each
50-
51- setfenv (2 , env )
52- end
53-
54- return exports
25+ return M
0 commit comments