busterjs / referee-combinators

Combinators goes assertion
0 stars 1 forks source link

Use raw asserts in makeTests #14

Open johlrogge opened 11 years ago

johlrogge commented 11 years ago

With the new selfdescribing raw asserts this:

  makeTests('attr', ['key', ca.equals('value')], ...)

could be changed into this:

   makeTests(ca.attr('key', ca.equals('value')), ...)

I just felt this need when I wanted to implement bind. Bind is neither a refute or assert. It simply combines two asserts in sequence and it makes sense to declare bind under combinators: referee.combinators.bind.

The same goes for the next version of attr that will not assert but just be a projection