Skip to content

Commit 6188bb6

Browse files
committed
fix test
1 parent 7e97fec commit 6188bb6

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

apps/language_server/test/providers/signature_help/signature_test.exs

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,17 +1305,31 @@ defmodule ElixirLS.LanguageServer.Providers.SignatureHelp.SignatureTest do
13051305

13061306
res = Signature.signature(code, 7, 21)
13071307

1308-
assert %{
1309-
active_param: 0,
1310-
signatures: [
1311-
%{
1312-
documentation: "A function available in all protocol definitions" <> _,
1313-
name: "impl_for",
1314-
params: ["data"],
1315-
spec: "@callback impl_for(term()) :: module() | nil"
1316-
}
1317-
]
1318-
} = res
1308+
if Version.match?(System.version(), ">= 1.18.0") do
1309+
assert %{
1310+
active_param: 0,
1311+
signatures: [
1312+
%{
1313+
documentation: "A function available in all protocol definitions" <> _,
1314+
name: "impl_for",
1315+
params: ["data"],
1316+
spec: "@callback impl_for(term()) :: module() | nil"
1317+
}
1318+
]
1319+
} = res
1320+
else
1321+
assert %{
1322+
active_param: 0,
1323+
signatures: [
1324+
%{
1325+
documentation: "Returns the module" <> _,
1326+
name: "impl_for",
1327+
params: ["data"],
1328+
spec: "@spec impl_for(term()) :: atom | nil"
1329+
}
1330+
]
1331+
} = res
1332+
end
13191333
end
13201334

13211335
test "retrieve metadata macro signature - fallback to macrocallback" do

0 commit comments

Comments
 (0)