Skip to content

Commit 5c99334

Browse files
author
Cedric Halbronn
committed
refactor: better output for lua tests
1 parent 2f0f693 commit 5c99334

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

cursorless.nvim/test/unit/cursorless_spec.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
describe("cursorless.nvim tests", function()
1+
describe("", function()
22
local cursorless = require("cursorless.cursorless")
33

4-
describe("window_get_visible_lines()", function()
5-
it("Can read one visible line", function()
4+
describe("window_get_visible_lines() ->", function()
5+
it("can read one visible line", function()
66
local pos = vim.api.nvim_win_get_cursor(0)[2]
77
local line = vim.api.nvim_get_current_line()
88
local nline = line:sub(0, pos) .. "hello" .. line:sub(pos + 1)
@@ -12,7 +12,7 @@ describe("cursorless.nvim tests", function()
1212
assert(table.concat(visible) == table.concat({ 1, 1 }))
1313
end)
1414

15-
it("Can read all lines visible on the window", function()
15+
it("can read all lines visible on the window", function()
1616
local maxlines = vim.api.nvim_win_get_height(0)
1717
local lines = {}
1818
for _ = 1, (maxlines + 1) do
@@ -23,18 +23,18 @@ describe("cursorless.nvim tests", function()
2323
assert(table.concat(visible) == table.concat({ 1, maxlines }))
2424
end)
2525
end)
26-
describe("select_range()", function()
27-
it("Selects the specified range", function()
26+
describe("select_range() ->", function()
27+
it("selects the specified range", function()
2828
local lines = "hello world"
2929
vim.api.nvim_buf_set_lines(0, 0, -1, false, vim.split(lines, "\n"))
3030
cursorless.select_range(1, 2, 1, 4)
3131

3232
assert(table.concat(_G.get_selected_text()) == "llo")
3333
end)
3434
end)
35-
describe("buffer_get_selection()", function()
35+
describe("buffer_get_selection() ->", function()
3636
it(
37-
"Can get the forward selection in a format expected by cursorless",
37+
"can get the forward selection in a format expected by cursorless",
3838
function()
3939
local lines = "hello world"
4040
vim.api.nvim_buf_set_lines(0, 0, -1, false, vim.split(lines, "\n"))
@@ -55,7 +55,7 @@ describe("cursorless.nvim tests", function()
5555
end
5656
)
5757
it(
58-
"Can get the backward selection in a format expected by cursorless",
58+
"can get the backward selection in a format expected by cursorless",
5959
function()
6060
local lines = "hello world"
6161
vim.api.nvim_buf_set_lines(0, 0, -1, false, vim.split(lines, "\n"))

0 commit comments

Comments
 (0)