fix(test): use possible configs
This commit is contained in:
parent
2c2a8762a9
commit
ff74c655e1
2 changed files with 3 additions and 3 deletions
|
|
@ -101,7 +101,7 @@ if __name__ == "__main__":
|
||||||
}
|
}
|
||||||
|
|
||||||
local user_overrides = {}
|
local user_overrides = {}
|
||||||
for _, snippet in ipairs((config and config.snippets) or {}) do
|
for _, snippet in ipairs(config.snippets) do
|
||||||
user_overrides[snippet.trigger] = snippet
|
user_overrides[snippet.trigger] = snippet
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -173,9 +173,9 @@ describe('cp.snippets', function()
|
||||||
assert.is_not_nil(mock_luasnip.added.python)
|
assert.is_not_nil(mock_luasnip.added.python)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('handles nil config gracefully', function()
|
it('handles empty config gracefully', function()
|
||||||
assert.has_no_errors(function()
|
assert.has_no_errors(function()
|
||||||
snippets.setup()
|
snippets.setup({ snippets = {} })
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue