diff --git a/doc/mini-test.txt b/doc/mini-test.txt index bf6f340d..2b2280c9 100644 --- a/doc/mini-test.txt +++ b/doc/mini-test.txt @@ -215,7 +215,7 @@ organization with |MiniTest-test-case|. All its elements are one of three categories: - A callable (object that can be called; function or table with `__call` - metatble entry) is considered to define a test action. It will be called + metatable entry) is considered to define a test action. It will be called with "current arguments" (result of all nested `parametrize` values, read further). If it throws error, test has failed. - A test set (output of this function) defines nested structure. Its @@ -783,7 +783,7 @@ Notes: - An important type of field is a "redirection table". It acts as a convenience wrapper for corresponding `vim.*` table. Can be used both to return and set values. Examples: - - `child.api.nvim_buf_line_count(0)` will execute + - `child.api.nvim_buf_line_count(0)` will act as `vim.api.nvim_buf_line_count(0)` inside child process and return its output to current process. - `child.bo.filetype = 'lua'` will execute `vim.bo.filetype = 'lua'` @@ -791,7 +791,7 @@ Notes: They still have same limitations listed above, so are not perfect. In case of a doubt, use `child.lua()`. - Almost all methods use |vim.rpcrequest()| (i.e. wait for call to finish and - then return value). See for `*_notify` variant to use |vim.rpcnotify()|. + then return value). In a `*_notify` variant |vim.rpcnotify()| is used. - All fields and methods should be called with `.`, not `:`. Class ~ @@ -826,7 +826,7 @@ Fields ~ {ensure_normal_mode} `(function)` Ensure normal mode. {get_screenshot} `(function)` Returns table with two "2d arrays" of single characters representing what is displayed on screen and how it looks. - Has `opts` table argument for optional configuratnion. + Has `opts` table argument for optional configuration. {job} `(table|nil)` Information about current job. If `nil`, child is not running. @@ -932,7 +932,7 @@ Notes: in case of more than 94 different ways text is displayed on screen. Parameters ~ -{opts} `(table|nil)` Options. Possieble fields: +{opts} `(table|nil)` Options. Possible fields: - `(boolean)` - whether to call |:redraw| prior to computing screenshot. Default: `true`. diff --git a/lua/mini/test.lua b/lua/mini/test.lua index c1bbae72..11dfb828 100644 --- a/lua/mini/test.lua +++ b/lua/mini/test.lua @@ -230,7 +230,7 @@ MiniTest.current = { all_cases = nil, case = nil } --- --- All its elements are one of three categories: --- - A callable (object that can be called; function or table with `__call` ---- metatble entry) is considered to define a test action. It will be called +--- metatable entry) is considered to define a test action. It will be called --- with "current arguments" (result of all nested `parametrize` values, read --- further). If it throws error, test has failed. --- - A test set (output of this function) defines nested structure. Its @@ -615,7 +615,7 @@ MiniTest.execute = function(cases, opts) -- Execute queue ensuring order -- NOTE: Directly `vim.schedule` each step without an explicit queue handling -- is possible, but it might interfere with async-adjacent yet synchronous - -- functions (as `vim.wait()`) callsed inside cases outside of child process. + -- functions (as `vim.wait()`) called inside cases outside of child process. local exec_queue_step, n_queue = function(_) end, #queue exec_queue_step = function(n) queue[n]() @@ -1171,7 +1171,7 @@ MiniTest.new_child_neovim = function() -- Properly exit Neovim. `pcall` avoids `channel closed by client` error. -- Also wait for it to actually close. This reduces simultaneously opened - -- Neovim instances and CPU load (overall reducing flacky tests). + -- Neovim instances and CPU load (overall reducing flaky tests). pcall(child.cmd, 'silent! 0cquit') vim.fn.jobwait({ child.job.id }, 1000) @@ -1420,7 +1420,7 @@ end --- - An important type of field is a "redirection table". It acts as a --- convenience wrapper for corresponding `vim.*` table. Can be used both to --- return and set values. Examples: ---- - `child.api.nvim_buf_line_count(0)` will execute +--- - `child.api.nvim_buf_line_count(0)` will act as --- `vim.api.nvim_buf_line_count(0)` inside child process and return its --- output to current process. --- - `child.bo.filetype = 'lua'` will execute `vim.bo.filetype = 'lua'` @@ -1428,7 +1428,7 @@ end --- They still have same limitations listed above, so are not perfect. In --- case of a doubt, use `child.lua()`. --- - Almost all methods use |vim.rpcrequest()| (i.e. wait for call to finish and ---- then return value). See for `*_notify` variant to use |vim.rpcnotify()|. +--- then return value). In a `*_notify` variant |vim.rpcnotify()| is used. --- - All fields and methods should be called with `.`, not `:`. --- ---@class MiniTest.child @@ -1461,7 +1461,7 @@ end ---@field ensure_normal_mode function Ensure normal mode. ---@field get_screenshot function Returns table with two "2d arrays" of single --- characters representing what is displayed on screen and how it looks. ---- Has `opts` table argument for optional configuratnion. +--- Has `opts` table argument for optional configuration. --- ---@field job table|nil Information about current job. If `nil`, child is not running. --- @@ -1561,7 +1561,7 @@ end --- 94 characters (ASCII codes between 33 and 126), so there will be duplicates --- in case of more than 94 different ways text is displayed on screen. --- ----@param opts table|nil Options. Possieble fields: +---@param opts table|nil Options. Possible fields: --- - `(boolean)` - whether to call |:redraw| prior to computing --- screenshot. Default: `true`. ---