Skip to content

Commit

Permalink
fix test on 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Oct 8, 2023
1 parent 33c4f2f commit 587f83b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions apps/language_server/test/providers/hover_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,18 @@ defmodule ElixirLS.LanguageServer.Providers.HoverTest do

{line, char} = {0, 19}

assert {:ok, %{"contents" => %{kind: "markdown", value: v}}} =
Hover.hover(text, line, char, fake_dir())

assert String.starts_with?(
v,
"```elixir\ndo\n```\n\n*reserved word*"
)
if Version.match?(System.version(), ">= 1.14.0") do
assert {:ok, %{"contents" => %{kind: "markdown", value: v}}} =
Hover.hover(text, line, char, fake_dir())

assert String.starts_with?(
v,
"```elixir\ndo\n```\n\n*reserved word*"
)
else
assert {:ok, nil} =
Hover.hover(text, line, char, fake_dir())
end
end

test "variable" do
Expand Down

0 comments on commit 587f83b

Please sign in to comment.