visionmedia/mocha — pull request #204 by BryanDonovan (2012-01-11 02:16:01+00:00)
Title: Specifying pending via options

Hi,

This pull request adds the ability to specify a pending test via an optional third argument (named 'options'). This is nice when you have tests that fail and don't want to have to comment them out to set them to a pending state.

Example:

```javascript
test('should recognize options.pending', function(){
assert.ok(false);
}, {pending: true});
```

I'm not sure that's the best way to approach this. I'd rather see something like:

```javascript
test('foo', function() {
this.pending();
assert.ok(false);
});
```
.. but I couldn't figure out a clean way to do that.

Maybe simply adding "PENDING" or "pending:" (or similar) to the test's title would be better., e.g:

```javascript
test('PENDING foo', function() {
assert.ok(false);
});
```

Let me know what you think and I can implement a different solution. I'd just like to have some way of specifying that a test is pending other than commenting out its body. I.e., this is what I normally do:

```javascript
test("pending test");/*, function(done) {
assert.ok(false);
done();
});*/
```