should.throw() should provide more information |
|||
Issue description
First, if no argument is provided to throw(), the error message includes "${expected}". As we discovered it's a typo. The test should be this._expected === null, not undefined.
Also, if no argument is given for throw(), it's useful to still print out the message associated with the actual error. We do this already when the expected error type is given; we just don't do that when it's not.
,
Dec 22 2016
,
Dec 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0cafa0b70e49ee5e694be08f19785c9b79e8e49a commit 0cafa0b70e49ee5e694be08f19785c9b79e8e49a Author: hongchan <hongchan@chromium.org> Date: Thu Dec 22 19:24:21 2016 Handle should.throw() assertion with no argument properly Fix a bug spitting '${expected}' in the error message when the no argument is given. Also print out the message associated with the actual error. BUG= 676377 TEST=LayoutTests/webaudio/unit-tests/audit.html Review-Url: https://codereview.chromium.org/2595393003 Cr-Commit-Position: refs/heads/master@{#440468} [modify] https://crrev.com/0cafa0b70e49ee5e694be08f19785c9b79e8e49a/third_party/WebKit/LayoutTests/webaudio/resources/audit.js [modify] https://crrev.com/0cafa0b70e49ee5e694be08f19785c9b79e8e49a/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-expected.txt [modify] https://crrev.com/0cafa0b70e49ee5e694be08f19785c9b79e8e49a/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html
,
Dec 22 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by hongchan@chromium.org
, Dec 22 2016