tcp node - undo trim if we re-add split chars

and fix tests
This commit is contained in:
Dave Conway-Jones
2022-03-23 22:07:43 +00:00
parent bda5dffa34
commit 8a40622815
6 changed files with 11 additions and 11 deletions

View File

@@ -45,7 +45,7 @@ describe('JSON node', function() {
msg.payload.employees[0].should.have.property('lastName', 'Smith');
done();
});
var jsonString = '{"employees":[{"firstName":"John", "lastName":"Smith"}]}';
var jsonString = ' {"employees":[{"firstName":"John", "lastName":"Smith"}]}\r\n ';
jn1.receive({payload:jsonString,topic: "bar"});
});
});
@@ -63,7 +63,7 @@ describe('JSON node', function() {
msg.payload.employees[0].should.have.property('lastName', 'Smith');
done();
});
var jsonString = Buffer.from('{"employees":[{"firstName":"John", "lastName":"Smith"}]}');
var jsonString = Buffer.from(' {"employees":[{"firstName":"John", "lastName":"Smith"}]}\r\n ');
jn1.receive({payload:jsonString,topic: "bar"});
});
});