Skip to content

Commit 918421f

Browse files
committed
fix: properly skip Deno integration tests when Deno is not available
- Add proper setup block to skip all Deno runtime tests when Deno executable is missing - Remove inline :skip return which doesn't work correctly in test context - Use ExUnit's recommended approach for conditional test skipping This ensures tests pass in CI environments where Deno is not installed.
1 parent 79f8277 commit 918421f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/phoenix/react/runtime_integration_test.exs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ defmodule Phoenix.React.RuntimeIntegrationTest do
8282
describe "Deno Runtime Integration" do
8383
@describetag :deno_runtime
8484

85+
setup do
86+
if System.find_executable("deno") == nil do
87+
{:skip, "Deno not available"}
88+
else
89+
:ok
90+
end
91+
end
92+
8593
test "configuration validation" do
8694
# Test valid configuration
8795
valid_config = %{
@@ -110,11 +118,9 @@ defmodule Phoenix.React.RuntimeIntegrationTest do
110118
assert {:error, _} = Config.runtime_config(:deno, invalid_config)
111119
end
112120

121+
@tag :skip_if_no_deno
113122
test "runtime startup and shutdown" do
114-
# Skip if deno is not available
115-
unless System.find_executable("deno") do
116-
:skip
117-
end
123+
# Skip if deno is not available - this is handled by the setup below
118124

119125
# Configure test environment with unique port
120126
test_port = 15227 + :rand.uniform(1000)

0 commit comments

Comments
 (0)