KogenCredo.Check.Warning.VacuousTest (KogenCredo v0.1.0)

View Source

Basics

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

An assertion that cannot fail proves nothing and gives false confidence. Assert on the value the code under test produced: assert result == expected, or a pattern that can fail.

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"].

:test_macros

Macros that define a test body.

This parameter defaults to [:test].

:allow_binding_match

Do not report assert var = expr (a match that always succeeds).

This parameter defaults to false.

General Parameters

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.