Skip to content

Commit

Permalink
Fix typo in promise_rejects example
Browse files Browse the repository at this point in the history
The promise_rejects function expects a Promise as third argument, not a
function. The "bar" function needs to be called.
  • Loading branch information
tidoust committed Aug 26, 2016
1 parent 8550cfe commit 148d66e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function bar() {
}

promise_test(function(t) {
return promise_rejects(t, new TypeError(), bar);
return promise_rejects(t, new TypeError(), bar());
}, "Another example");
```
Expand Down

0 comments on commit 148d66e

Please sign in to comment.