samira-t/setak — Issue #5: Add waitFor* api methods
Author: alexdoth
Created: 2012-01-22 03:59:16+00:00
State: open

Currently Setak provides the following api methods to allow the client to insert actions at particular points of the actor system under test.

```
afterMessage(message) {
// do stuff
}

afterAllMessages {
// do stuff
}

whenStable {
// do stuff
}
```
I find my self writing the below a lot more often

```
afterMessage(message) {}
// do stuff
```
In order to reduce the number of brackets and indentation of my code. It improves readability.

I suggest that an alias methods be added that don't require any anonymous functions.
As an example consider the below method names

```
waitForMessage(message)
// do stuff

waitForAllMessages()
// do stuff

waitForStable()
// do stuff
```