Skip to content

Commit

Permalink
fix(tests): uses testharness in scrolling strategy (#2307)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamtajti authored Jan 6, 2023
1 parent 18fc02b commit cd67e81
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 262 deletions.
244 changes: 0 additions & 244 deletions lua/telescope/pickers/_test.lua

This file was deleted.

1 change: 0 additions & 1 deletion lua/tests/automated/layout_strategies_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-- local tester = require('telescope.pickers._test')
local config = require "telescope.config"
local resolve = require "telescope.config.resolve"
local layout_strats = require "telescope.pickers.layout_strategies"
Expand Down
14 changes: 9 additions & 5 deletions lua/tests/automated/pickers/find_files_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ describe("builtin.find_files", function()
tester.run_file "find_files__readme"
end)

it("should handle cycling for full list", function()
tester.run_file "find_files__scrolling_descending_cycle"
end)

for _, configuration in ipairs {
{ sorting_strategy = "descending" },
{ sorting_strategy = "ascending" },
Expand Down Expand Up @@ -107,12 +111,12 @@ describe("builtin.find_files", function()

it("should be able to c-n the items", function()
tester.run_string [[
runner.picker('find_files', 'fixtures/file<c-n>', {
runner.picker('find_files', 'fixtures/find_files/file<c-n>', {
post_typed = {
{
{
" lua/tests/fixtures/file_a.txt",
"> lua/tests/fixtures/file_abc.txt",
" lua/tests/fixtures/find_files/file_a.txt",
"> lua/tests/fixtures/find_files/file_abc.txt",
}, GetResults
},
},
Expand All @@ -129,9 +133,9 @@ describe("builtin.find_files", function()

it("should be able to get the current selection", function()
tester.run_string [[
runner.picker('find_files', 'fixtures/file_abc', {
runner.picker('find_files', 'fixtures/find_files/file_abc', {
post_typed = {
{ 'lua/tests/fixtures/file_abc.txt', GetSelectionValue },
{ 'lua/tests/fixtures/find_files/file_abc.txt', GetSelectionValue },
}
})
]]
Expand Down
12 changes: 0 additions & 12 deletions lua/tests/automated/pickers/scrolling_spec.lua

This file was deleted.

File renamed without changes.
File renamed without changes.

0 comments on commit cd67e81

Please sign in to comment.