jfpedroza / neotest-elixir

Neotest adapter for Elixir
MIT License
38 stars 10 forks source link

Tests with function calls in the name are not found #17

Closed fuelen closed 7 months ago

fuelen commented 1 year ago
defmodule MyTest do
  use ExUnit.Case

  test inspect(&MyModule.hello/1) do
    # ...
  end
end

^Such tests are not found. The same, but with interpolation, works okay:

  test "#{inspect(&MyModule.hello/1)}" do
jfpedroza commented 1 year ago

I hadn't seen test names with arbitrary expressions like that. I'll add support for it.

fuelen commented 1 year ago

I use it quite a lot to have module, function and arity in sync with implementation. Thanks :)

jfpedroza commented 7 months ago

Supporting arbitrary calls turned out to be quite tricky, probably requires a refactor. Similar to #19.

But I managed to support the specific case "inspect" because it results on a somewhat predictable test name.

fuelen commented 7 months ago

@jfpedroza Thanks! This helps a lot. I'd like to ask support this for describe as well :)

jfpedroza commented 7 months ago

Makes sense. I just realized we don't support dynamic describes at all.

Can you open a separate issue for that? :)

fuelen commented 7 months ago

Sure