fix(ci): selene unused vars
This commit is contained in:
parent
a32fd396d3
commit
1f384b0ba0
3 changed files with 12 additions and 7 deletions
|
|
@ -75,7 +75,10 @@ describe('async integration', function()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.cmd = { e = function() end, only = function() end }
|
vim.cmd = {
|
||||||
|
e = function() end,
|
||||||
|
only = function() end,
|
||||||
|
}
|
||||||
vim.api.nvim_get_current_buf = function()
|
vim.api.nvim_get_current_buf = function()
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
@ -137,9 +140,8 @@ describe('async integration', function()
|
||||||
it('handles complete contest setup workflow', function()
|
it('handles complete contest setup workflow', function()
|
||||||
local setup_completed = false
|
local setup_completed = false
|
||||||
local mock_async_setup = {
|
local mock_async_setup = {
|
||||||
setup_contest_async = function(contest_id, language)
|
setup_contest_async = function(contest_id, _)
|
||||||
assert.equals('abc123', contest_id)
|
assert.equals('abc123', contest_id)
|
||||||
assert.is_nil(language)
|
|
||||||
setup_completed = true
|
setup_completed = true
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
@ -159,7 +161,7 @@ describe('async integration', function()
|
||||||
|
|
||||||
local problem_setup_called = false
|
local problem_setup_called = false
|
||||||
local mock_async_setup = {
|
local mock_async_setup = {
|
||||||
setup_problem_async = function(contest_id, problem_id, language)
|
setup_problem_async = function(contest_id, problem_id, _)
|
||||||
assert.equals('abc123', contest_id)
|
assert.equals('abc123', contest_id)
|
||||||
assert.equals('b', problem_id)
|
assert.equals('b', problem_id)
|
||||||
problem_setup_called = true
|
problem_setup_called = true
|
||||||
|
|
@ -254,7 +256,7 @@ describe('async integration', function()
|
||||||
local callback_executed = false
|
local callback_executed = false
|
||||||
|
|
||||||
local mock_scraper = {
|
local mock_scraper = {
|
||||||
scrape_contest_metadata_async = function(platform, contest_id, callback)
|
scrape_contest_metadata_async = function(_, _, callback)
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
callback({ success = true, problems = { { id = 'a' } } })
|
callback({ success = true, problems = { { id = 'a' } } })
|
||||||
callback_executed = true
|
callback_executed = true
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ describe('cp.async.jobs', function()
|
||||||
assert.equals(1, #mock_jobs)
|
assert.equals(1, #mock_jobs)
|
||||||
assert.same(args, mock_jobs[1].args)
|
assert.same(args, mock_jobs[1].args)
|
||||||
assert.same(opts, mock_jobs[1].opts)
|
assert.same(opts, mock_jobs[1].opts)
|
||||||
assert.equals(callback, mock_jobs[1].callback)
|
assert.is_function(mock_jobs[1].callback)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('kills existing job when starting new job with same ID', function()
|
it('kills existing job when starting new job with same ID', function()
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,10 @@ describe('cp.async.setup', function()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.cmd = { e = function() end, only = function() end }
|
vim.cmd = {
|
||||||
|
e = function() end,
|
||||||
|
only = function() end,
|
||||||
|
}
|
||||||
vim.api.nvim_get_current_buf = function()
|
vim.api.nvim_get_current_buf = function()
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue