-
-
Notifications
You must be signed in to change notification settings - Fork 329
Expand file tree
/
Copy pathtests.lua
More file actions
33 lines (26 loc) · 751 Bytes
/
tests.lua
File metadata and controls
33 lines (26 loc) · 751 Bytes
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
local util = require "plenary.async.util"
---@class PlenaryAsyncTests
local M = {}
---@param s string
---@param async_func PlenaryAsyncFunction
M.describe = function(s, async_func)
describe(s, async_func)
end
---@param s string
---@param async_func PlenaryAsyncFunction
M.it = function(s, async_func)
it(s, util.will_block(async_func, tonumber(vim.env.PLENARY_TEST_TIMEOUT)))
end
---@param async_func PlenaryAsyncFunction
M.pending = function(async_func)
pending(async_func)
end
---@param async_func PlenaryAsyncFunction
M.before_each = function(async_func)
before_each(util.will_block(async_func))
end
---@param async_func PlenaryAsyncFunction
M.after_each = function(async_func)
after_each(util.will_block(async_func))
end
return M