Skip to content

Commit a49a240

Browse files
committed
test
1 parent c6056dd commit a49a240

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/style/pipes_test.exs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,14 @@ defmodule Styler.Style.PipesTest do
499499
end
500500

501501
test "rewrites then/2 when the passed function is a named function reference" do
502-
assert_style("a |> then(&fun/1) |> c", "a |> fun() |> c()")
503-
assert_style("a |> then(&DateTime.from_is8601/1) |> c", "a |> DateTime.from_is8601() |> c()")
504-
assert_style("a |> then(&DateTime.from_is8601/1)", "DateTime.from_is8601(a)")
505-
assert_style("a |> then(&fun(&1)) |> c", "a |> fun() |> c()")
506-
assert_style("a |> then(&fun(&1, d)) |> c", "a |> fun(d) |> c()")
507-
assert_style("a |> then(&fun(d, &1)) |> c", "a |> then(&fun(d, &1)) |> c()")
502+
assert_style "a |> then(&fun/1) |> c", "a |> fun() |> c()"
503+
assert_style "a |> then(&DateTime.from_is8601/1) |> c", "a |> DateTime.from_is8601() |> c()"
504+
assert_style "a |> then(&DateTime.from_is8601/1)", "DateTime.from_is8601(a)"
505+
assert_style "a |> then(&fun(&1)) |> c", "a |> fun() |> c()"
506+
assert_style "a |> then(&fun(&1, d)) |> c", "a |> fun(d) |> c()"
507+
508+
assert_style "a |> then(&fun(d, &1)) |> c()"
509+
assert_style "a |> then(&fun(&1, d, %{foo: &1})) |> c()"
508510
end
509511

510512
test "adds parens to 1-arity pipes" do

0 commit comments

Comments
 (0)