Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishrb committed Mar 21, 2024
1 parent 4d3c5f5 commit 7da83d4
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions test/spec/gx/handler_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,12 @@ describe("test handler", function()
stub(helper, "get_filename")
helper.get_filename.on_call_with().returns("package.json")

assert.same(
assert.same({
{
{
["name"] = "package_json",
["url"] = "https://www.npmjs.com/package/@rushstack/eslint-patch",
},
["name"] = "package_json",
["url"] = "https://www.npmjs.com/package/@rushstack/eslint-patch",
},
handler.get_url("v", '"@rushstack/eslint-patch": "^1.2.0",', activated_handlers)
)
}, handler.get_url("v", '"@rushstack/eslint-patch": "^1.2.0",', activated_handlers))

helper.get_filename:revert()
end)
Expand All @@ -145,13 +142,10 @@ describe("test handler", function()
end,
}

assert.same(
{
{ ["name"] = "custom", ["url"] = "https://from.user.handler" },
{ ["name"] = "commit", ["url"] = "https://github.com/chrishrb/gx.nvim/commit/1a2b3c4" },
},
handler.get_url("v", "1a2b3c4", activated_handlers)
)
assert.same({
{ ["name"] = "custom", ["url"] = "https://from.user.handler" },
{ ["name"] = "commit", ["url"] = "https://github.com/chrishrb/gx.nvim/commit/1a2b3c4" },
}, handler.get_url("v", "1a2b3c4", activated_handlers))
end)

it("user defined handler instead of builtin handler", function()
Expand Down

0 comments on commit 7da83d4

Please sign in to comment.