Skip to content

Commit

Permalink
fix tests on 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Aug 22, 2024
1 parent 29f8273 commit 690a5f9
Showing 1 changed file with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1637,23 +1637,6 @@ defmodule ElixirLS.LanguageServer.Providers.Completion.SuggestionTest do
]
end

test "lists vars in unfinished fn" do
buffer = """
defmodule MyServer do
[]
|> Enum.min_by(fn x ->
end
"""

list =
Suggestion.suggestions(buffer, 3, 26)
|> Enum.filter(fn s -> s.type == :variable end)

assert list == [
%{name: "x", type: :variable}
]
end

test "lists vars in string interpolation" do
buffer = """
defmodule MyServer do
Expand Down Expand Up @@ -1812,6 +1795,7 @@ defmodule ElixirLS.LanguageServer.Providers.Completion.SuggestionTest do
]
end

if Version.match?(System.version(), ">= 1.17.0") do
test "lists params in fn's not finished multiline" do
buffer = """
defmodule MyServer do
Expand All @@ -1832,7 +1816,9 @@ defmodule ElixirLS.LanguageServer.Providers.Completion.SuggestionTest do

assert list == [%{name: "arg", type: :variable}]
end
end

if Version.match?(System.version(), ">= 1.17.0") do
test "lists params in fn's not finished" do
buffer = """
defmodule MyServer do
Expand All @@ -1854,6 +1840,7 @@ defmodule ElixirLS.LanguageServer.Providers.Completion.SuggestionTest do
%{name: "arg", type: :variable}
]
end
end

test "lists params in defs not finished" do
buffer = """
Expand Down

0 comments on commit 690a5f9

Please sign in to comment.