feat(setup): warn no tests found

This commit is contained in:
Barrett Ruth 2025-10-05 13:45:26 -04:00
parent 25fde26943
commit fd550bc654

View file

@ -57,6 +57,12 @@ function M.setup_contest(platform, contest_id, problem_id, language)
logger.log(('Fetching test cases...'):format(cached_len, #problems))
scraper.scrape_all_tests(platform, contest_id, function(ev)
local cached_tests = {}
if vim.tbl_isempty(ev.tests) then
logger.log(
("No tests found for problem '%s'."):format(ev.problem_id),
vim.log.levels.WARN
)
end
for i, t in ipairs(ev.tests) do
cached_tests[i] = { index = i, input = t.input, expected = t.expected }
end