View Source PhoenixTest.Credo.NoOpenBrowser (PhoenixTest v0.8.0)
Basics
This check is disabled by default.
Learn how to enable it via .credo.exs
.
This check has a base priority of normal
and works with any version of Elixir.
Explanation
The open_browser/1
function is useful during development but should not be
committed in tests as it would open browsers during CI runs, which can cause
unexpected behavior and CI failures.
A Credo check that disallows the use of open_browser/1
in test code.
Usage
Add this check to your .credo.exs
file:
%{
configs: [
%{
name: "default",
requires: ["./deps/phoenix_test/lib/phoenix_test/credo/**/*.ex"],
checks: [
{PhoenixTest.Credo.NoOpenBrowser, []}
]
}
]
}
Check-Specific Parameters
There are no specific parameters for this check.
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs
config file.