Skip to content

Commit

Permalink
test(feat): add tests for reversed config map function
Browse files Browse the repository at this point in the history
  • Loading branch information
PriceHiller committed Jul 16, 2023
1 parent 6ee2a96 commit b9e41b9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/specs/neogit/config_spec.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
describe("neogit config", function()
describe("reversed status maps", function()
it("can be reversed by copy", function()
local config = require("neogit.config")
config.get_reversed_status_maps()
assert.True(config.values.mappings.status["s"] ~= nil)
assert.True(config.values.mappings.status["Stage"] == nil)
end)

it("returns reversed status mappings", function ()
local config = require("neogit.config")
local reversed_maps = config.get_reversed_status_maps()
assert.True(reversed_maps["Stage"] ~= nil)
assert.True(reversed_maps["Unstage"] ~= nil)
assert.True(reversed_maps["CommitPopup"] ~= nil)
end)
end)
end)

0 comments on commit b9e41b9

Please sign in to comment.