Probably you have run into this: if you have slightly more complex tests than testing the output of a single function, you need assignment and then assert that assignment with an operator. Consider this controller test in phoenix:
conn =
build_conn()
|> post("/upload_content_cover", params)
assert %{"success" => true} = json_response(conn, 200)
with an `assert_match` function this translates to the following:
build_conn()
|> post("/upload_content_cover", params)
|> json_response(conn, 200)
|> assert_match(%{"success" => true})
I prefer the latter, because it is more declarative.
My issue with using operators in assertions, is that while improving readability in some cases, they are not very functional constructs, and thus do not compose well. Having a functional equivalent for the assertions, makes sense in a functional language in my opinion.
I can also see why this should be a library, keeping the assertion library less complex. Just would like to share my thinking. I'm also interested in feedback, and how I might be wrong :).