1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-04 23:58:01 +00:00

Add Skip A Specific Test as an elixir til

This commit is contained in:
jbranchaud
2019-03-21 10:41:29 -05:00
parent 4ef9d1f967
commit 1307d05e7a
2 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
# Skip A Specific Test
Elixir's `ExUnit` supports all kinds of tags for customizing the behavior of
your test suite. The `:skip` tag signals that `ExUnit` should skip over that
specific test.
```elixir
@tag :skip
test "this is a test that should not run" do
assert false
end
```
When you run `mix test`, it will make sure to not execute any tests with the
`:skip` tag.
Using the `:skip` tag can be a great temporary measure in a lot of
situations. It is not a good long-term practice to keep these around and
check them in.