forked from nvim-lua/plenary.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
36 lines (29 loc) · 1.01 KB
/
init.lua
File metadata and controls
36 lines (29 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
local exports = require('plenary.async_lib.async')
exports.uv = require('plenary.async_lib.uv_async')
exports.util = require('plenary.async_lib.util')
exports.lsp = require('plenary.async_lib.lsp')
exports.api = require('plenary.async_lib.api')
exports.tests = require('plenary.async_lib.tests')
exports.tests.add_globals = function()
a = exports
async = exports.async
await = exports.await
await_all = exports.await_all
-- must prefix with a or stack overflow, plenary.test harness already added it
a.describe = exports.tests.describe
-- must prefix with a or stack overflow
a.it = exports.tests.it
end
exports.tests.add_to_env = function()
local env = getfenv(2)
env.a = exports
env.async = exports.async
env.await = exports.await
env.await_all = exports.await_all
-- must prefix with a or stack overflow, plenary.test harness already added it
env.a.describe = exports.tests.describe
-- must prefix with a or stack overflow
env.a.it = exports.tests.it
setfenv(2, env)
end
return exports