From 947eac76b317adc644f75f0f5cdfb2c7c6284655 Mon Sep 17 00:00:00 2001 From: Takuto Wada Date: Sat, 18 Apr 2020 17:45:34 +0900 Subject: [PATCH] docs(README): sync with behavior changes in Node13 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a2b69ba..3a65d00 100644 --- a/README.md +++ b/README.md @@ -79,11 +79,11 @@ SPEC - when messages does not match, rejects with the actual error. - if `error` is a `` (constructor function), validate instanceof using constructor (works well with ES2015 classes that extends Error). - when actual error is an instanceof ``, resolves with undefined. - - when actual error is NOT an instanceof ``, rejects with the actual error. + - when actual error is NOT an instanceof ``, rejects with AssertionError. - appends `error.name` as expected error class name to the message if the `promiseFn` is not rejected. - if `error` is a ``, 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 ``, 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.