julismz
Set name to DocTest tests
Hi,
I’m wondering if there is some way to put some custom / detailed name to the tests using the DocTest, in order to be showed on the console when I run “mix test --trace”.
I mixed 2 DocTests and 1 ExUnit to show the diff on the output:
$ mix test --trace
FooTest [test/foo_test.exs]
- doctest Foo.say_hello/0 (2) (0.00ms) [L#3]
- test return default greeting (0.00ms) [L#5]
- doctest Foo.analyse/0 (1) (0.00ms) [L#3]
Finished in 0.03 seconds (0.00s async, 0.03s sync)
2 doctests, 1 test, 0 failuresRandomized with seed 321499
I’ve red the documentation but couldn’t find anything.
Thanks!
Most Liked
BartOtten
I’ve read the source code. The answer is: No can’t do.
# a = arity
# f = function
# m = module
# n = accumulating number
defp test_name(%{fun_arity: :moduledoc}, m, n) do
"module #{inspect(m)} (#{n})"
end
defp test_name(%{fun_arity: {f, a}}, m, n) do
"#{inspect(m)}.#{f}/#{a} (#{n})"
end
2
Last Post!
julismz
Popular in Questions
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
What is the idiomatic way of matching for not nil in Elixir?
E.g.,
First way:
defp halt_if_not_signed_in(conn, signed_in_account) when...
New
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Hello everybody,
usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
Other popular topics
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









