maxmx03.solarized.nvim/tests/load_spec.lua
Max Miliano 6a34504272 fix: Configuring highlight of type "@variable" #69
feat: github workflows, vusted, stylua
2024-03-28 11:24:54 -03:00

31 lines
850 B
Lua

local utils = require('solarized.utils.test')
local to_hex = utils.to_hex
describe('Initialization', function()
setup(function()
vim.o.background = 'light'
vim.cmd.colorscheme('solarized')
end)
test('Loads without encountering any errors', function()
assert.equal('solarized', vim.g.colors_name)
assert.is_true(vim.o.termguicolors)
end)
test('Background is set to light', function()
local output = vim.api.nvim_get_hl(0, { name = 'Normal' })
local expect = '#fdf6e3'
assert.equals(expect, to_hex(output.bg))
end)
test('Selenized is being loaded', function()
require('solarized').setup({ palette = 'selenized' })
vim.cmd.colorscheme('solarized')
local output = vim.api.nvim_get_hl(0, { name = 'Normal' })
local expect = '#fbf3db'
assert.equals(expect, to_hex(output.bg))
end)
end)