Add test for appending to Mix install with options (#1137)

This commit is contained in:
Jonatan Kłosko 2022-04-21 20:09:48 +02:00 committed by GitHub
parent e5092e4c99
commit 5e966bfb68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,6 +99,32 @@ defmodule Livebook.Runtime.DependenciesTest do
# Result
:ok\
"""}
assert Dependencies.add_mix_deps(
"""
Mix.install(
[
{:req, "~> 0.2.0"}
],
system_env: [
# {"XLA_TARGET", "cuda111"}
]
)\
""",
[@kino]
) ==
{:ok,
"""
Mix.install(
[
{:req, "~> 0.2.0"},
{:kino, "~> 0.5.0"}
],
system_env: [
# {"XLA_TARGET", "cuda111"}
]
)\
"""}
end
test "does not add the dependency if it already exists" do