mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fixup Function node error line reporting
This commit is contained in:
@@ -242,7 +242,7 @@ describe('function node', function() {
|
||||
});
|
||||
|
||||
it('should handle and log script error', function(done) {
|
||||
var flow = [{id:"n1",type:"function",wires:[["n2"]],func:"retunr"}];
|
||||
var flow = [{id:"n1",type:"function",wires:[["n2"]],func:"var a = 1;\nretunr"}];
|
||||
helper.load(functionNode, flow, function() {
|
||||
var n1 = helper.getNode("n1");
|
||||
n1.receive({payload:"foo",topic: "bar"});
|
||||
@@ -256,7 +256,7 @@ describe('function node', function() {
|
||||
msg.should.have.property('level', helper.log().ERROR);
|
||||
msg.should.have.property('id', 'n1');
|
||||
msg.should.have.property('type', 'function');
|
||||
msg.should.have.property('msg', 'ReferenceError: retunr is not defined (line 1, col 1)');
|
||||
msg.should.have.property('msg', 'ReferenceError: retunr is not defined (line 2, col 1)');
|
||||
done();
|
||||
} catch(err) {
|
||||
done(err);
|
||||
|
Reference in New Issue
Block a user