From a9e8084aa037f004fca6be8f11b38e3419ec0a2e Mon Sep 17 00:00:00 2001 From: Reece Stevens Date: Sat, 26 Oct 2024 13:25:11 -0500 Subject: [PATCH] Upgrade tests to use new file loading schema --- tests/plenary/clock/init_spec.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/plenary/clock/init_spec.lua b/tests/plenary/clock/init_spec.lua index 53fd863cb..187fe54bb 100644 --- a/tests/plenary/clock/init_spec.lua +++ b/tests/plenary/clock/init_spec.lua @@ -1,6 +1,5 @@ local OrgFiles = require('orgmode.files') local OrgFile = require('orgmode.files.file') -local Files = require('orgmode.parser.files') local org = require('orgmode') describe('Clock', function() @@ -23,14 +22,12 @@ describe('Clock', function() vim.cmd('edit ' .. file.filename) - Files.file_loader = OrgFiles:new({ + orgmode.files = OrgFiles:new({ paths = { file.filename }, - }) - local files = Files.loader() - files:add_to_paths(file.filename):wait() + }):load_sync(true, 20000) -- Establish baseline: Test 1 is clocked in - local clock = org.clock:new({ files = files }) + local clock = org.clock:new({ files = orgmode.files }) assert.are.same('Test 1', clock.clocked_headline:get_title()) assert.is_true(clock.clocked_headline:is_clocked_in())