mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
additional test to cover last line in encodeObject
This commit is contained in:
parent
63cc9adeaa
commit
c54509df3d
@ -868,7 +868,20 @@ describe("@node-red/util/util", function() {
|
||||
success.should.eql(true);
|
||||
done();
|
||||
});
|
||||
|
||||
it('test bad object constructor', function(done) {
|
||||
var msg = {
|
||||
msg: {
|
||||
mystrangeobj:"hello",
|
||||
constructor: {
|
||||
get name(){
|
||||
throw new Error('Exception in constructor name');
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
var result = util.encodeObject(msg);
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user