antonmi/espec

More readable syntax?

開放

#300 建立於 2020年8月14日

 (7 則留言) (0 個反應) (0 位負責人)Elixir (67 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (814 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I don't understand why you chose to use this for your syntax:

expect actual |> to(eq expected)

rather than this:

expect(actual).to.eq.(expected)

The second seems far more readable to me. Like, obviously the pipe operator is a core part of Elixir to the point that everyone programming in Elixir is going to understand it, but simple English is still more readable, and that goes doubly so when the more English syntax ends up being almost exactly the same as Ruby and close to the same as JavaScript, and triply so when the basic point of this library is to make more readable tests than ExUnit, in a style more like RSpec.

貢獻者指南