From 4725867ec66b9a0f5e5ad95a1fd94c2f97fa2d2c Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Thu, 4 Aug 2022 16:00:30 -0400 Subject: 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. --- lua/tests/pickers/find_files__readme.lua | 6 +++--- lua/tests/pickers/find_files__scrolling_descending_cycle.lua | 10 ++++------ lua/tests/pickers/find_files__with_ctrl_n.lua | 8 -------- 3 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 lua/tests/pickers/find_files__with_ctrl_n.lua (limited to 'lua/tests/pickers') 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", { +runner.picker("find_files", "telescope", { 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", { - post_close = { - { "lua/tests/fixtures/file_abc.txt", helper.get_selection_value }, - }, -}) -- cgit v1.2.3