Skip to content

Formatter fails with no configured tests #43

@FrancisMurillo

Description

@FrancisMurillo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions