Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/nodelix/version_manager.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Nodelix.VersionManager do
# https://nodejs.org/en/about/previous-releases
@latest_lts_version "20.10.0"
@latest_lts_version "20.12.2"

@default_archive_base_url "https://nodejs.org/dist/v$version/node-v$version-$target.$ext"
@signed_checksums_base_url "https://nodejs.org/dist/v$version/SHASUMS256.txt.asc"
Expand Down
10 changes: 5 additions & 5 deletions test/nodelix_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule NodelixTest do
use ExUnit.Case, async: true

@version Nodelix.VersionManager.latest_lts_version()
@latest_lts_version Nodelix.VersionManager.latest_lts_version()

setup_all do
File.rm_rf!(Path.join([Mix.Project.build_path(), "nodejs"]))
Expand All @@ -11,13 +11,13 @@ defmodule NodelixTest do
test "run without profile" do
assert ExUnit.CaptureIO.capture_io(fn ->
assert Mix.Task.rerun("nodelix", ["--version"]) == :ok
end) =~ @version
end) =~ @latest_lts_version
end

test "run on another profile" do
assert ExUnit.CaptureIO.capture_io(fn ->
assert Mix.Task.rerun("nodelix", ["--profile", "test_profile"]) == :ok
end) =~ @version
end) =~ @latest_lts_version
end

test "installs and runs multiple versions" do
Expand All @@ -27,13 +27,13 @@ defmodule NodelixTest do

assert ExUnit.CaptureIO.capture_io(fn ->
assert Mix.Task.rerun("nodelix", ["--version"]) == :ok
end) =~ @version
end) =~ @latest_lts_version
end

test "re-installs with force flag" do
assert ExUnit.CaptureLog.capture_log(fn ->
assert Mix.Task.rerun("nodelix.install", ["--force"]) == :ok
end) =~ "Succesfully installed Node.js v#{@version}"
end) =~ "Succesfully installed Node.js v#{@latest_lts_version}"
end

test "installs with custom URL" do
Expand Down