fix(test): use possible configs

This commit is contained in:
Barrett Ruth 2025-09-18 23:23:02 -04:00
parent 2c2a8762a9
commit ff74c655e1
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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)