Skip to content

Commit

Permalink
docs(README): sync with behavior changes in Node13
Browse files Browse the repository at this point in the history
  • Loading branch information
twada committed Apr 18, 2020
1 parent c3f3ecf commit 947eac7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -79,11 +79,11 @@ SPEC
- when messages does not match, rejects with the actual error.
- if `error` is a `<Class>` (constructor function), validate instanceof using constructor (works well with ES2015 classes that extends Error).
- when actual error is an instanceof `<Class>`, resolves with undefined.
- when actual error is NOT an instanceof `<Class>`, rejects with the actual error.
- when actual error is NOT an instanceof `<Class>`, rejects with AssertionError.
- appends `error.name` as expected error class name to the message if the `promiseFn` is not rejected.
- if `error` is a `<Function>`, run custom validation against actual rejection result.
- when validation function returns `true`, resolves with undefined.
- when returned value of validation function is NOT `true`, rejects with the actual error.
- when returned value of validation function is NOT `true`, rejects with AssertionError.
- if Error is thrown from validation function, rejects with the error.
- if `error` is an `<Object>`, that is an object where each property will be tested for.
- when all key-value pairs in `error` are the same as key-value pairs from actual rejected result, resolves with undefined. Note that only properties on the error object will be tested.
Expand Down

0 comments on commit 947eac7

Please sign in to comment.