hamjest icon indicating copy to clipboard operation
hamjest copied to clipboard

enhancement request: introduce expect(object).to(matcher) syntax

Open richardwan opened this issue 4 years ago • 1 comments

introduce syntactic sugar to make the hamjest code look more like jest code.

__.expect(5).toBe(__.greaterThan(4))

would be equivalent to __.assertThat(5, __.greaterThan(4))

if this would help people familiar with the "jest syntax" unleash the power of the hamcrest style, i would be happy to try and implement this.

richardwan avatar Oct 01 '20 14:10 richardwan

Thank you for the suggestion. Sure, give it a try! I welcome such PRs.

rluba avatar Oct 02 '20 06:10 rluba