Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions doc/mini-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -783,15 +783,15 @@ 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'`
inside child process.
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 ~
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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:
- <redraw> `(boolean)` - whether to call |:redraw| prior to computing
screenshot. Default: `true`.

Expand Down
14 changes: 7 additions & 7 deletions lua/mini/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]()
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -1420,15 +1420,15 @@ 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'`
--- inside child process.
--- 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
Expand Down Expand Up @@ -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.
---
Expand Down Expand Up @@ -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:
--- - <redraw> `(boolean)` - whether to call |:redraw| prior to computing
--- screenshot. Default: `true`.
---
Expand Down
Loading