diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2022-08-04 16:00:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-04 16:00:30 -0400 |
| commit | 4725867ec66b9a0f5e5ad95a1fd94c2f97fa2d2c (patch) | |
| tree | f4dcf668bb66469273e630f69eebe123d390f2c0 /lua/tests/pickers | |
| parent | 75a5e5065376d9103fc4bafc3ae6327304cee6e9 (diff) | |
fix: restore testing framework to actually work (#2070)
after refactor to some new asynchronous items for finders,
the tests stopped actually doing anything.
now they do things again.
Diffstat (limited to 'lua/tests/pickers')
| -rw-r--r-- | lua/tests/pickers/find_files__readme.lua | 6 | ||||
| -rw-r--r-- | lua/tests/pickers/find_files__scrolling_descending_cycle.lua | 10 | ||||
| -rw-r--r-- | lua/tests/pickers/find_files__with_ctrl_n.lua | 8 |
3 files changed, 7 insertions, 17 deletions
diff --git a/lua/tests/pickers/find_files__readme.lua b/lua/tests/pickers/find_files__readme.lua index 7ec8bcc..1b76ad6 100644 --- a/lua/tests/pickers/find_files__readme.lua +++ b/lua/tests/pickers/find_files__readme.lua @@ -1,7 +1,7 @@ -local tester = require "telescope.pickers._test" -local helper = require "telescope.pickers._test_helpers" +local helper = require "telescope.testharness.helpers" +local runner = require "telescope.testharness.runner" -tester.builtin_picker("find_files", "README.md", { +runner.picker("find_files", "README.md", { post_close = { { "README.md", helper.get_file }, }, diff --git a/lua/tests/pickers/find_files__scrolling_descending_cycle.lua b/lua/tests/pickers/find_files__scrolling_descending_cycle.lua index 4f8a3f2..6b3c023 100644 --- a/lua/tests/pickers/find_files__scrolling_descending_cycle.lua +++ b/lua/tests/pickers/find_files__scrolling_descending_cycle.lua @@ -1,10 +1,8 @@ -require("plenary.reload").reload_module "plenary" -require("plenary.reload").reload_module "telescope" +local tester = require "telescope.testharness" +local helper = require "telescope.testharness.helpers" +local runner = require "telescope.testharness.runner" -local tester = require "telescope.pickers._test" -local helper = require "telescope.pickers._test_helpers" - -tester.builtin_picker("find_files", "telescope<c-n>", { +runner.picker("find_files", "telescope<c-n>", { post_close = { tester.not_ { "plugin/telescope.vim", helper.get_file }, }, diff --git a/lua/tests/pickers/find_files__with_ctrl_n.lua b/lua/tests/pickers/find_files__with_ctrl_n.lua deleted file mode 100644 index 4820f34..0000000 --- a/lua/tests/pickers/find_files__with_ctrl_n.lua +++ /dev/null @@ -1,8 +0,0 @@ -local tester = require "telescope.pickers._test" -local helper = require "telescope.pickers._test_helpers" - -tester.builtin_picker("find_files", "fixtures/file<c-p>", { - post_close = { - { "lua/tests/fixtures/file_abc.txt", helper.get_selection_value }, - }, -}) |
