Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter fails with no configured tests #43

Open
FrancisMurillo opened this issue Oct 3, 2017 · 0 comments
Open

Formatter fails with no configured tests #43

FrancisMurillo opened this issue Oct 3, 2017 · 0 comments

Comments

@FrancisMurillo
Copy link

Just a minor issue. When running mix test with no tests configured. The formatter has the error message:

[error] GenServer #PID<0.546.0> terminating
** (KeyError) key :test not found in: %{}
    (excheck) lib/excheck/formatter.ex:66: ExCheck.Formatter.update_tests_counter/1
    (excheck) lib/excheck/formatter.ex:28: ExCheck.Formatter.handle_cast/2
    (stdlib) gen_server.erl:601: :gen_server.try_dispatch/4
    (stdlib) gen_server.erl:683: :gen_server.handle_msg/5
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:"$gen_cast", {:suite_finished, 36754, nil}}
State: %{colors: [enabled: true], failure_counter: 0, invalid_counter: 0, seed: 627868, skipped_counter: 0, test_counter: %{}, trace: false, width: 80}

This occured when I was smoke testing the minimum configuration before adding tests. Not fatal but it did give me a tiny spook if I misconfigured anything with this library.

luc-tielen pushed a commit to luc-tielen/excheck that referenced this issue Oct 6, 2017
luc-tielen pushed a commit to luc-tielen/excheck that referenced this issue Oct 6, 2017
devstopfix added a commit to devstopfix/excheck that referenced this issue Aug 7, 2019
Having just this test suite:

defmodule SansConfTest do
  use ExUnit.Case
  use ExCheck

  # test "greets the world" do
  #   assert SansConf.hello() == :world
  # end
end

Would cause:

** (EXIT from #PID<0.92.0>) exited in: GenServer.stop(#PID<0.262.0>, :normal, 30000)
    ** (EXIT) exited in: :sys.terminate(#PID<0.262.0>, :normal, :infinity)
        ** (EXIT) an exception was raised:
            ** (KeyError) key :test not found in: %{}
                (excheck) lib/excheck/formatter.ex:65: ExCheck.Formatter.update_tests_counter/1
devstopfix added a commit to devstopfix/excheck that referenced this issue Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant