<commit_before>Asserts that a node.js-style asynchronous function taking a single callback
will call it with a truthy value as the first parameter.

```javascript#async:true
function myFailingAsyncFunction(cb) {
    setTimeout(function () {
        cb(new Error('Oh dear'));
    }, 0);
}

return expect(myFailingAsyncFunction, 'to call the callback with error');
```

You can assert the error message is a given string if you provide a
string as the second parameter.

```javascript#async:true
return expect(myFailingAsyncFunction, 'to call the callback with error', 'Oh dear');<commit_msg>Documentation, to call the callback: Remove construct that broke update-examples.<commit_after>Asserts that a node.js-style asynchronous function taking a single callback
will call it with a truthy value as the first parameter.

```javascript
function myFailingAsyncFunction(cb) {
    setTimeout(function () {
        cb(new Error('Oh dear'));
    }, 0);
}
```

```javascript#async:true
return expect(myFailingAsyncFunction, 'to call the callback with error');
```

You can assert the error message is a given string if you provide a
string as the second parameter.

```javascript#async:true
return expect(myFailingAsyncFunction, 'to call the callback with error', 'Oh dear');
{'fraction_non_alphanumeric': 0.09320695102685624, 'fraction_numerical': 0.001579778830963665, 'mean_word_length': 5.150485436893204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6272845', 'n_tokens_mistral': 343, 'n_tokens_neox': 331, 'n_words': 143}