fix(ci): fix the format
This commit is contained in:
parent
cdcf11767e
commit
97873ffd37
4 changed files with 95 additions and 72 deletions
|
|
@ -2,13 +2,10 @@ describe('cp.execute', function()
|
|||
local execute
|
||||
local mock_system_calls
|
||||
local temp_files
|
||||
local spec_helper = require('spec.spec_helper')
|
||||
|
||||
before_each(function()
|
||||
package.loaded['cp.log'] = {
|
||||
log = function() end,
|
||||
set_config = function() end,
|
||||
}
|
||||
|
||||
spec_helper.setup()
|
||||
execute = require('cp.execute')
|
||||
mock_system_calls = {}
|
||||
temp_files = {}
|
||||
|
|
@ -65,7 +62,7 @@ describe('cp.execute', function()
|
|||
|
||||
after_each(function()
|
||||
vim.system = vim.system_original or vim.system
|
||||
package.loaded['cp.log'] = nil
|
||||
spec_helper.teardown()
|
||||
temp_files = {}
|
||||
end)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ describe('cp.scrape', function()
|
|||
local mock_cache
|
||||
local mock_system_calls
|
||||
local temp_files
|
||||
local spec_helper = require('spec.spec_helper')
|
||||
|
||||
before_each(function()
|
||||
spec_helper.setup()
|
||||
temp_files = {}
|
||||
|
||||
mock_cache = {
|
||||
|
|
@ -85,6 +87,7 @@ describe('cp.scrape', function()
|
|||
after_each(function()
|
||||
package.loaded['cp.cache'] = nil
|
||||
vim.system = vim.system_original or vim.system
|
||||
spec_helper.teardown()
|
||||
temp_files = {}
|
||||
end)
|
||||
|
||||
|
|
|
|||
14
spec/spec_helper.lua
Normal file
14
spec/spec_helper.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
package.loaded['cp.log'] = {
|
||||
log = function() end,
|
||||
set_config = function() end,
|
||||
}
|
||||
end
|
||||
|
||||
function M.teardown()
|
||||
package.loaded['cp.log'] = nil
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue