mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add node.error handling to core nodes
This commit is contained in:
@@ -140,7 +140,7 @@ describe('html node', function() {
|
||||
logEvents.should.have.length(1);
|
||||
// Each logEvent is the array of args passed to the function.
|
||||
logEvents[0][0].should.have.a.property('msg');
|
||||
logEvents[0][0].msg.should.startWith("Error:");
|
||||
logEvents[0][0].should.have.a.property('level',helper.log().ERROR);
|
||||
|
||||
done();
|
||||
} catch(err) {
|
||||
|
@@ -83,7 +83,8 @@ describe('JSON node', function() {
|
||||
return evt[0].type == "json";
|
||||
});
|
||||
logEvents.should.have.length(1);
|
||||
logEvents[0][0].should.have.a.property('msg',"SyntaxError: Unexpected token o"+ "\nfoo");
|
||||
logEvents[0][0].should.have.a.property('msg',"Unexpected token o");
|
||||
logEvents[0][0].should.have.a.property('level',helper.log().ERROR);
|
||||
done();
|
||||
} catch(err) {
|
||||
done(err);
|
||||
|
Reference in New Issue
Block a user