Opened 12 years ago
Closed 11 years ago
#9351 closed enhancement (fixed)
Displaying hint with _assertFailure
Reported by: | lmdavid | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | TestFramework | Version: | 1.3.0 |
Keywords: | doh, hint, error message, assertFalse, assertTrue | Cc: | |
Blocked By: | Blocking: |
Description
Hi,
As I was looking at runner.js, I found that you can provide more specific error messages to assertions errors as a hint. For example: doh.assertFalse = function(/*Object*/ condition, /*String?*/ hint){
Unfortunately this feature seems to be disabled by the following line in the definition of doh._AssertFailure = function(msg, hint){ ...
if(!(this instanceof doh._AssertFailure)){
return new doh._AssertFailure(msg);
}
.. Should not it be read: return new doh._AssertFailure(msg,hint); ?
I tried it like this and it displays the hints correctly. Is there any reason for the missing argument in the original source code ?
Change History (2)
comment:1 Changed 11 years ago by
Milestone: | tbd → 1.4 |
---|---|
Owner: | changed from alex to dante |
Status: | new → assigned |
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
fixed in [20331] ... hope I didn't break trac sync :/