Skip to content

Commit 39be967

Browse files
committed
Improve typespecs for t:ExUnit.configure_opts/0
`:exclude` can be: - an atom - a list of atoms and keyword elements Based on the documentation, we can see that: - `:exclude` can be a tag, and tags can be atoms: - https://github.com/elixir-lang/elixir/blob/a2a669eb7b72d74ccc11a652f2f089ceb24b1b84/lib/ex_unit/lib/ex_unit/case.ex#L120 - https://github.com/elixir-lang/elixir/blob/a2a669eb7b72d74ccc11a652f2f089ceb24b1b84/lib/ex_unit/lib/ex_unit/case.ex#L256 - The can be list of atoms combined with keyword lists:: - https://github.com/elixir-lang/elixir/blob/a2a669eb7b72d74ccc11a652f2f089ceb24b1b84/lib/mix/test/test_helper.exs#L62-L64 `:include` works same way as `:exclude`, so same rules apply.
1 parent a2a669e commit 39be967

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/ex_unit/lib/ex_unit.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ defmodule ExUnit do
117117
diff_delete: atom(),
118118
diff_delete_whitespace: IO.ANSI.ansidata()
119119
]}
120-
| {:exclude, keyword()}
120+
| {:exclude, atom() | [atom() | {atom(), any()}]}
121121
| {:exit_status, non_neg_integer()}
122122
| {:failures_manifest_path, String.t()}
123123
| {:formatters, [module()]}
124-
| {:include, keyword()}
124+
| {:include, atom() | [atom() | {atom(), any()}]}
125125
| {:max_cases, pos_integer()}
126126
| {:max_failures, pos_integer() | :infinity}
127127
| {:only_test_ids, [test_id()]}

0 commit comments

Comments
 (0)