KogenCredo.Check.Warning.TestModuleShape (KogenCredo v0.1.0)
View SourceBasics
This check is disabled by default.
Learn how to enable it via .credo.exs.
This check has a base priority of low and works with any version of Elixir.
Explanation
Async test modules run concurrently and fail fast on hidden global state; large test
modules hide unrelated behaviour. Use async: true, inject dependencies instead of
mutating globals, and split modules by behaviour. Serial modules need an explicit,
reviewed serial_allowed entry.
Check-Specific Parameters
Use the following parameters to configure this check:
:file_suffixes
Filename suffixes treated as test files.
This parameter defaults to ["_test.exs"].
:max_tests
Maximum test runs per module (tests x literal parameterize entries).
This parameter defaults to 30.
:serial_allowed
Files (path, suffix or glob) allowed to be non-async.
This parameter defaults to [].
:case_suffix
Module-name suffix identifying a test case template (Case).
This parameter defaults to "Case".
:require_async
Set to false to only check the size cap.
This parameter defaults to true.
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.