Skip to content

Commit ec5abdc

Browse files
committed
fix: use ExUnit exclude mechanism for Deno test skipping
- Replace setup block with ExUnit's exclude mechanism for conditional test skipping - Add :skip_if_no_deno tag to Deno runtime integration tests - Configure test_helper.exs to exclude :skip_if_no_deno tests when Deno is not available - This follows ExUnit best practices for conditional test execution Resolves CI test failures by properly skipping Deno tests when Deno executable is missing.
1 parent 918421f commit ec5abdc

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

test/phoenix/react/runtime_integration_test.exs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,7 @@ defmodule Phoenix.React.RuntimeIntegrationTest do
8181

8282
describe "Deno Runtime Integration" do
8383
@describetag :deno_runtime
84-
85-
setup do
86-
if System.find_executable("deno") == nil do
87-
{:skip, "Deno not available"}
88-
else
89-
:ok
90-
end
91-
end
84+
@describetag :skip_if_no_deno
9285

9386
test "configuration validation" do
9487
# Test valid configuration

test/test_helper.exs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
ExUnit.start()
1+
# Configure ExUnit to skip Deno tests if Deno is not available
2+
exclude =
3+
if System.find_executable("deno") == nil do
4+
[:skip_if_no_deno]
5+
else
6+
[]
7+
end
8+
9+
ExUnit.start(exclude: exclude)
210
Phoenix.React.start_link([])
311

412
ExUnit.after_suite(fn _results ->

0 commit comments

Comments
 (0)