New issue
Advanced search Search tips

Issue 676377 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 672152



Sign in to add a comment

should.throw() should provide more information

Project Member Reported by rtoy@chromium.org, Dec 21 2016

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.
 
Blocking: 672152
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Status: Verified (was: Started)

Sign in to add a comment