substack/tape — pull request #47 by Raynos (2013-08-30 18:14:48+00:00)
Title: make assert.end behave like a node callback

The use case for this is to avoid a little bit of boilerplate.

With this patch you can pass `assert.end` as a node-style callback to your last async thing and it will do `assert.ifError(err)` for you. This is useful if you don't care about the result of the last async thing like writing to disk or db.

## before

```js
test("configure file system for this test file", function (assert) {
fs.writeFile(test_file, test_stuff, function (err) {
assert.ifError(err)

assert.end()
})
})
```

## after

```js
test("configure file system for this test file", function (assert) {
fs.writeFile(test_file, test_stuff, assert.end)
})
```

My personal use-case for it is

```js
var test = require("tape")
var server = require("./_server")

test("ensure test server is running", function (assert) {
server.start(assert.end)
})
```

(this is the same as #36 except I fixed the remote branch to only contain the single commit)