Letractively / aost

Automatically exported from code.google.com/p/aost
Other
1 stars 0 forks source link

Format assertion error message in Tellurium IDE 0.8.0 #464

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
[error] Failed to run command [name: assertNotEquals, uid: x, value: test]: 
message: undefined, name: undefined, filename: undefined, linenumber: 
undefined. 

Original issue reported on code.google.com by John.Jian.Fang@gmail.com on 13 Aug 2010 at 5:17

GoogleCodeExporter commented 8 years ago

Original comment by John.Jian.Fang@gmail.com on 13 Aug 2010 at 5:18

GoogleCodeExporter commented 8 years ago
Fixed by wrap the assertion error message in a new Error as follows:

TelluriumCommandExecutor.prototype.assertTrue = function(variable){
    try{
        assertTrue(variable);
    }catch(error){
        if(error.isJsUnitFailure){
            var message = "assertTrue failed: " + error.jsUnitMessage + ", " + (error.comment != null ? error.comment: "");
            throw new Error(message);
        }
        throw error;
    }
};

Original comment by John.Jian.Fang@gmail.com on 13 Aug 2010 at 5:59