Skip to content

Commit

Permalink
chore: format the new test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
grossvogel committed Dec 5, 2024
1 parent 07b310f commit c28b78a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions test/nodejs_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,18 @@ defmodule NodeJS.Test do
test "handles ANSI sequences without corrupting protocol" do
# Test basic ANSI handling - protocol messages should work
assert {:ok, "clean output"} = NodeJS.call({"terminal-test", "outputWithANSI"})

# Test complex ANSI sequences - protocol messages should work
assert {:ok, "complex test passed"} = NodeJS.call({"terminal-test", "complexOutput"})

# Test multiple processes don't interfere with each other
tasks = for _ <- 1..4 do
Task.async(fn ->
NodeJS.call({"terminal-test", "outputWithANSI"})
end)
end

tasks =
for _ <- 1..4 do
Task.async(fn ->
NodeJS.call({"terminal-test", "outputWithANSI"})
end)
end

results = Task.await_many(tasks)
assert Enum.all?(results, &match?({:ok, "clean output"}, &1))
end
Expand Down

0 comments on commit c28b78a

Please sign in to comment.