philbooth/trier.js — pull request #5 by adlawson (2013-09-24 12:30:13+00:00)
Title: Add tests to cover mixed predicate use

I wanted to figure out what happened when `attempt` is called with both predicates, especially with the exponential interval. I understand that if a predicate isn't defined it defaults to `yes()`, but I wanted to prove the results with mixed input.

The new test cases cover:
- `when` passes immediately and `until` is called five times
- `when` is called five times and `until` passes immediately
- `when` passes immediately and `until` fails with exponential interval
- `when` fails with exponential interval and `until` passes immediately

If you think the tests are redundant because of the `yes()` default then don't bother merging. I just wrote them for my own sanity.