将ExUnit中的测试标记为待处理

时间:2018-05-07 15:41:10

标签: elixir tdd ex-unit

我正在寻找一种方法来将ExUnit中编写的测试标记为待定。

我知道我可以通过标签跳过测试,但我正在寻找一种方法来跳过测试,使得高度透明,因为需要实现这些测试。其他测试框架如RSpec或ESpec显示这些标记为黄色并在每次运行时突出显示它们。

ExUnit中有这样的功能吗?

2 个答案:

答案 0 :(得分:1)

作为解决方法,您可以利用以下内容:

pcregrep -hM "@tag :to_be_implemented\s*test" ./test/**/*.exs | grep test

并可能创建您自己的mix task

答案 1 :(得分:0)

@tag :skip
test "this is my pending test"

这将导致:

 mix test
 .......................................................**

 Finished in 0.1 seconds (0.00s async, 0.1s sync)
 57 tests, 0 failures, 2 skipped
相关问题