Compare commits

..

31 Commits

Author SHA1 Message Date
Dave Conway-Jones
7c4e782c60 clone msg for every single line output
(this may not be desired)
Add tests to ensure properties go trhough
2019-10-25 15:09:20 +01:00
Dave Conway-Jones
c8b8beda6a update grunt sass and add node-sass for node 12
update Gruntfile.js to work with node 12
2019-10-25 15:07:09 +01:00
Nick O'Leary
6026da867b Fix timings of Delay node tests 2019-10-25 11:48:12 +01:00
Nick O'Leary
4d58902ba7 Merge pull request #2340 from pdong/chore/update-to-jsonata-1.7
Update JSONata to 1.7.0
2019-10-25 10:25:22 +01:00
Nick O'Leary
4dc1343445 Merge pull request #2350 from kazuhitoyokoi/master-addtranslation4httprequest
Add translation for http request node
2019-10-25 10:22:41 +01:00
Nick O'Leary
080487cb33 Bump https-proxy-agent version 2019-10-25 10:22:05 +01:00
Nick O'Leary
0febcf4f9e Merge pull request #2339 from bartbutenaers/master
Check auth type on opening
2019-10-23 21:38:54 +01:00
Nick O'Leary
cd23f711ed Merge pull request #2332 from TJKoury/patch-2
Remove msg
2019-10-23 21:37:58 +01:00
Nick O'Leary
f9b147af42 Merge pull request #2334 from kazuhitoyokoi/master-fixsubflowlang2
Fix language handling in subflow node
2019-10-23 21:36:57 +01:00
Nick O'Leary
775f1110d3 Merge pull request #2337 from piyonakajima/language_of_tooltip
fix tooltip language in subflow
2019-10-23 21:33:32 +01:00
Nick O'Leary
57649a9b81 Merge pull request #2345 from 1ft-seabass/fix-tcpin
Removed unused variable "remoteDetails"
2019-10-23 21:32:29 +01:00
Nick O'Leary
72a268b70a Merge pull request #2344 from 1ft-seabass/fix-70-csv
Fixed the code format of 70-CSV.js from Tab to Space. try again.
2019-10-23 21:31:30 +01:00
Nick O'Leary
f86a171dff Merge pull request #2346 from 1ft-seabass/fix-jsdoc-description
Fixed jsdoc descriptions
2019-10-23 21:31:02 +01:00
tseigo
e022b782a9 Fixed jsdoc descriptions 2019-10-22 00:35:35 +09:00
tseigo
bd67731bb7 Removed unused variable "remoteDetails" 2019-10-22 00:28:57 +09:00
tseigo
25de4e4782 Fixed the code format of 70-CSV.js from Tab to Space. try again. 2019-10-22 00:24:10 +09:00
Phi Dong
c590247afa Update node-red/util JSONata to 1.7.0 2019-10-19 14:33:13 -07:00
Phi Dong
5d36539271 Update JSONata to 1.7.0 2019-10-19 12:37:54 -07:00
bartbutenaers
0d673486a3 Check auth type on opening 2019-10-19 14:16:03 +02:00
Nick O'Leary
29f1651a18 Use default language if lng param not set in i18n req 2019-10-18 16:09:14 +01:00
NAKAJIMA,Tomohiro
dd20a3e685 Fix the language of the tooltip 2019-10-18 23:50:54 +09:00
Kazuhito Yokoi
75a5b1354c Add translation for http request node 2019-10-17 21:56:22 +09:00
Kazuhito Yokoi
dae9ac8173 Fix language handling in subflow node 2019-10-17 21:24:55 +09:00
Dave Conway-Jones
78b735276b fix httprequest timeout units info
to close #2333
2019-10-17 13:24:51 +01:00
Kazuhito Yokoi
e10dd54e2b Revert "Merge pull request #2328 from kazuhitoyokoi/master-fixsubflowlang"
This reverts commit 873bdc6733, reversing
changes made to 8a40b075b5.
2019-10-17 21:05:06 +09:00
TJKoury
cb8deab1f9 Update packages/node_modules/@node-red/runtime/lib/nodes/Node.js
Co-Authored-By: Nick O'Leary <nick.oleary@gmail.com>
2019-10-17 07:42:11 -04:00
TJKoury
e5c27d0236 Remove msg
`msg` not defined in scope.
2019-10-16 20:00:11 -04:00
Nick O'Leary
873bdc6733 Merge pull request #2328 from kazuhitoyokoi/master-fixsubflowlang
Fix language handling in subflow node
2019-10-16 11:12:48 +01:00
Nick O'Leary
8a40b075b5 Merge pull request #2326 from bonanitech/patch-1
Fix palette editor search visualization
2019-10-16 11:12:03 +01:00
Kazuhito Yokoi
56c41374bf Fix language handling in subflow node 2019-10-15 16:50:16 +09:00
Mauricio Bonani
a08c2c6437 Fix palette editor search visualization 2019-10-14 15:13:59 -04:00
20 changed files with 164 additions and 71 deletions

View File

@@ -16,6 +16,7 @@
var path = require("path");
var fs = require("fs-extra");
var sass = require("node-sass");
module.exports = function(grunt) {
@@ -220,6 +221,7 @@ module.exports = function(grunt) {
sass: {
build: {
options: {
implementation: sass,
outputStyle: 'compressed'
},
files: [{

View File

@@ -41,13 +41,13 @@
"fs-extra": "8.1.0",
"fs.notify": "0.0.4",
"hash-sum": "2.0.0",
"https-proxy-agent": "2.2.2",
"https-proxy-agent": "2.2.3",
"i18next": "15.1.2",
"iconv-lite": "0.5.0",
"is-utf8": "0.2.1",
"js-yaml": "3.13.1",
"json-stringify-safe": "5.0.1",
"jsonata": "1.6.5",
"jsonata": "1.7.0",
"media-typer": "1.1.0",
"memorystore": "1.6.1",
"mime": "2.4.4",
@@ -93,19 +93,20 @@
"grunt-mocha-istanbul": "5.0.2",
"grunt-nodemon": "~0.4.2",
"grunt-npm-command": "~0.1.2",
"grunt-sass": "~2.0.0",
"grunt-sass": "~3.1.0",
"grunt-simple-mocha": "~0.4.1",
"http-proxy": "^1.16.2",
"istanbul": "0.4.5",
"jsdoc-nr-template": "github:node-red/jsdoc-nr-template",
"minami": "1.2.3",
"mocha": "^5.2.0",
"mosca": "^2.8.3",
"node-red-node-test-helper": "^0.2.3",
"node-sass": "^4.13.0",
"should": "^8.4.0",
"sinon": "1.17.7",
"stoppable": "^1.1.0",
"supertest": "3.4.2",
"node-red-node-test-helper": "^0.2.3",
"jsdoc-nr-template": "node-red/jsdoc-nr-template"
"supertest": "3.4.2"
},
"engines": {
"node": ">=8"

View File

@@ -15,7 +15,7 @@
**/
var fs = require('fs');
var path = require('path');
//var apiUtil = require('../util');
// var apiUtil = require('../util');
var i18n = require("@node-red/util").i18n; // TODO: separate module
@@ -41,7 +41,7 @@ module.exports = {
var namespace = req.params[0];
var lngs = req.query.lng;
namespace = namespace.replace(/\.json$/,"");
var lang = req.query.lng; //apiUtil.determineLangFromHeaders(req.acceptsLanguages() || []);
var lang = req.query.lng || i18n.defaultLang; //apiUtil.determineLangFromHeaders(req.acceptsLanguages() || []);
var prevLang = i18n.i.language;
// Trigger a load from disk of the language if it is not the default
i18n.i.changeLanguage(lang, function(){

View File

@@ -42,7 +42,7 @@ var editor;
/**
* Initialise the module.
* @param {Object} settings The runtime settings
* @param {HTTPServer} server An instance of HTTP Server
* @param {HTTPServer} _server An instance of HTTP Server
* @param {Storage} storage An instance of Node-RED Storage
* @param {Runtime} runtimeAPI An instance of Node-RED Runtime
* @memberof @node-red/editor-api

View File

@@ -1,7 +1,7 @@
{
"$string": {
"args": "arg",
"desc": "Casts the *arg* parameter to a string using the following casting rules:\n\n - Strings are unchanged\n - Functions are converted to an empty string\n - Numeric infinity and NaN throw an error because they cannot be represented as a JSON number\n - All other values are converted to a JSON string using the `JSON.stringify` function"
"args": "arg[, prettify]",
"desc": "Casts the `arg` parameter to a string using the following casting rules:\n\n - Strings are unchanged\n - Functions are converted to an empty string\n - Numeric infinity and NaN throw an error because they cannot be represented as a JSON number\n - All other values are converted to a JSON string using the `JSON.stringify` function. If `prettify` is true, then \"prettified\" JSON is produced. i.e One line per field and lines will be indented based on the field depth."
},
"$length": {
"args": "str",
@@ -185,7 +185,7 @@
},
"$reduce": {
"args":"array, function [, init]",
"desc":"Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`.\n\nThe optional `init` parameter is used as the initial value in the aggregation."
"desc":"Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`. The signature of `function` must be of the form: `myfunc($accumulator, $value[, $index[, $array]])`\n\nThe optional `init` parameter is used as the initial value in the aggregation."
},
"$flowContext": {
"args": "string[, string]",
@@ -230,6 +230,37 @@
"$parseInteger": {
"args": "string, picture",
"desc": "Parses the contents of the `string` parameter to an integer (as a JSON number) using the format specified by the `picture` string. The `picture` string parameter has the same format as `$formatInteger`."
},
"$error": {
"args": "[str]",
"desc": "Throws an error with a message. The optional `str` will replace the default message of `$error() function evaluated`"
},
"$assert": {
"args": "arg, str",
"desc": "If `arg` is true the function returns undefined. If `arg` is false an exception is thrown with `str` as the message of the exception."
},
"$single": {
"args": "array, function",
"desc": "Returns the one and only value in the `array` parameter that satisfies the `function` predicate (i.e. the `function` returns Boolean `true` when passed the value). Throws an exception if the number of matching values is not exactly one.\n\nThe function should be supplied in the following signature: `function(value [, index [, array]])` where value is each input of the array, index is the position of that value and the whole array is passed as the third argument"
},
"$encodeUrl": {
"args": "str",
"desc": "Encodes a Uniform Resource Locator (URL) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.\n\nExample: `$encodeUrlComponent(\"?x=test\")` => `\"%3Fx%3Dtest\"`"
},
"$encodeUrlComponent": {
"args": "str",
"desc": "Encodes a Uniform Resource Locator (URL) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character. \n\nExample: `$encodeUrl(\"https://mozilla.org/?x=шеллы\")` => `\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\"`"
},
"$decodeUrl": {
"args": "str",
"desc": "Decodes a Uniform Resource Locator (URL) component previously created by encodeUrlComponent. \n\nExample: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
},
"$decodeUrlComponent": {
"args": "str",
"desc": "Decodes a Uniform Resource Locator (URL) previously created by encodeUrl. \n\nExample: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
},
"$distinct": {
"args": "array",
"desc": "Returns an array with duplicate values removed from `array`"
}
}

View File

@@ -2558,7 +2558,7 @@ RED.editor = (function() {
/**
* Register a type editor.
* @param {string} type - the type name
* @param {object} options - the editor definition
* @param {object} definition - the editor definition
* @function
* @memberof RED.editor
*/

View File

@@ -788,7 +788,7 @@ RED.palette.editor = (function() {
initInstallTab();
})
packageList = $('<ol>',{style:"position: absolute;top: 78px;bottom: 0;left: 0;right: 0px;"}).appendTo(installTab).editableList({
packageList = $('<ol>',{style:"position: absolute;top: 79px;bottom: 0;left: 0;right: 0px;"}).appendTo(installTab).editableList({
addButton: false,
scrollOnAdd: false,
addItem: function(container,i,object) {

View File

@@ -802,8 +802,8 @@ RED.subflow = (function() {
}
$("<option/>", opt).text(item.text).appendTo(locales);
});
currentLocale = RED.i18n.lang();
locales.val(currentLocale);
var locale = RED.i18n.lang();
locales.val(locale);
locales.on("change", function() {
currentLocale = $(this).val();
@@ -1048,7 +1048,7 @@ RED.subflow = (function() {
}
langs.forEach(function(l) {
var row = $('<div>').appendTo(content);
$('<span>').css({display:"inline-block",width:"50px"}).text(l+(l===currentLocale?"*":"")).appendTo(row);
$('<span>').css({display:"inline-block",width:"120px"}).text(RED._("languages."+l)+(l===currentLocale?"*":"")).appendTo(row);
$('<span>').text(ui.label[l]||"").appendTo(row);
});
return content;
@@ -1371,7 +1371,8 @@ RED.subflow = (function() {
}
var labels = ui.label || {};
var labelText = lookupLabel(labels, labels["en-US"]||tenv.name, currentLocale);
var locale = RED.i18n.lang();
var labelText = lookupLabel(labels, labels["en-US"]||tenv.name, locale);
var label = $('<label>').appendTo(row);
var labelContainer = $('<span></span>').appendTo(label);
if (ui.icon) {
@@ -1423,7 +1424,7 @@ RED.subflow = (function() {
input = $('<select>').css('width','70%').appendTo(row);
if (ui.opts.opts) {
ui.opts.opts.forEach(function(o) {
$('<option>').val(o.v).text(lookupLabel(o.l, o.l['en-US']||o.v, currentLocale)).appendTo(input);
$('<option>').val(o.v).text(lookupLabel(o.l, o.l['en-US']||o.v, locale)).appendTo(input);
})
}
input.val(val.value);

View File

@@ -109,6 +109,7 @@
{
'$abs':{ args:[ 'number' ]},
'$append':{ args:[ 'array1', 'array2' ]},
'$assert':{ args: [ 'arg', 'str' ]},
'$average':{ args:[ 'array' ]},
'$base64decode':{ args:[ ]},
'$base64encode':{ args:[ ]},
@@ -116,8 +117,14 @@
'$ceil':{ args:[ 'number' ]},
'$contains':{ args:[ 'str', 'pattern' ]},
'$count':{ args:[ 'array' ]},
'$decodeUrl':{ args:[ 'str' ]},
'$decodeUrlComponent':{ args:[ 'str' ]},
'$distinct':{ args:[ 'array' ]},
'$each':{ args:[ 'object', 'function' ]},
'$encodeUrl':{ args: ['str'] },
'$encodeUrlComponent':{ args:[ 'str' ]},
'$env': { args:[ 'arg' ]},
'$error':{ args:[ 'str' ]},
'$eval': { args: ['expr', 'context']},
'$exists':{ args:[ 'arg' ]},
'$filter':{ args:[ 'array', 'function' ]},
@@ -151,12 +158,13 @@
'$reverse':{ args:[ 'array' ]},
'$round':{ args:[ 'number', 'precision' ]},
'$shuffle':{ args:[ 'array' ]},
'$sift':{ args:[ 'object', 'function' ]},
'$sift':{ args: ['object', 'function'] },
'$single':{ args: ['array', 'function'] },
'$sort':{ args:[ 'array', 'function' ]},
'$split':{ args:[ 'str', 'separator', 'limit' ]},
'$spread':{ args:[ 'object' ]},
'$sqrt':{ args:[ 'number' ]},
'$string':{ args:[ 'arg' ]},
'$string':{ args:[ 'arg', 'prettify' ]},
'$substring':{ args:[ 'str', 'start', 'length' ]},
'$substringAfter':{ args:[ 'str', 'chars' ]},
'$substringBefore':{ args:[ 'str', 'chars' ]},

View File

@@ -170,6 +170,7 @@
if (this.authType) {
$('#node-input-useAuth').prop('checked', true);
$("#node-input-authType-select").val(this.authType);
$("#node-input-authType-select").change();
} else {
$('#node-input-useAuth').prop('checked', false);
}

View File

@@ -371,7 +371,6 @@ module.exports = function(RED) {
var server = net.createServer(function (socket) {
socket.setKeepAlive(true,120000);
if (socketTimeout !== null) { socket.setTimeout(socketTimeout); }
var remoteDetails = socket.remoteAddress+":"+socket.remotePort;
node.log(RED._("tcpin.status.connection-from",{host:socket.remoteAddress, port:socket.remotePort}));
connectedSockets.push(socket);
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});

View File

@@ -230,17 +230,17 @@ module.exports = function(RED) {
node.send(msg); // finally send the array
}
}
else {
var len = a.length;
for (var i = 0; i < len; i++) {
else {
var len = a.length;
for (var i = 0; i < len; i++) {
var newMessage = RED.util.cloneMessage(msg);
newMessage.payload = a[i];
if (!has_parts) {
newMessage.parts = {
id: msg._msgid,
index: i,
count: len
};
newMessage.parts = {
id: msg._msgid,
index: i,
count: len
};
}
else {
newMessage.parts.index -= node.skip;
@@ -251,8 +251,8 @@ module.exports = function(RED) {
}
}
node.send(newMessage);
}
}
}
}
node.linecount = 0;
}
catch(e) { node.error(e,msg); }

View File

@@ -140,8 +140,8 @@ module.exports = function(RED) {
try {
var stat = fs.statSync(filename);
node.wstreamIno = stat.ino;
} catch(err) {
}
catch(err) { }
});
node.wstream.on("error", function(err) {
node.error(RED._("file.errors.appendfail",{error:err.toString()}),msg);
@@ -276,7 +276,6 @@ module.exports = function(RED) {
ch = "\n";
type = "string";
}
var hwm;
var getout = false;
var rs = fs.createReadStream(filename)
@@ -290,30 +289,24 @@ module.exports = function(RED) {
spare += decode(chunk, node.encoding);
var bits = spare.split("\n");
for (var i=0; i < bits.length - 1; i++) {
var m = {
payload:bits[i],
topic:msg.topic,
filename:msg.filename,
parts:{index:count, ch:ch, type:type, id:msg._msgid}
}
var sendMessage = RED.util.cloneMessage(msg);
sendMessage.payload = bits[i];
sendMessage.parts = {index:count, ch:ch, type:type, id:msg._msgid};
count += 1;
nodeSend(m);
nodeSend(sendMessage);
}
spare = bits[i];
}
if (node.format === "stream") {
var m = {
payload:chunk,
topic:msg.topic,
filename:msg.filename,
parts:{index:count, ch:ch, type:type, id:msg._msgid}
}
var sendMessage = RED.util.cloneMessage(msg);
sendMessage.payload = chunk;
sendMessage.parts = {index:count, ch:ch, type:type, id:msg._msgid};
count += 1;
if (chunk.length < hwm) { // last chunk is smaller that high water mark = eof
getout = false;
m.parts.count = count;
sendMessage.parts.count = count;
}
nodeSend(m);
nodeSend(sendMessage);
}
}
else {
@@ -332,28 +325,23 @@ module.exports = function(RED) {
nodeDone();
})
.on('end', function() {
var sendMessage = RED.util.cloneMessage(msg);
if (node.chunk === false) {
if (node.format === "utf8") {
msg.payload = decode(lines, node.encoding);
sendMessage.payload = decode(lines, node.encoding);
}
else { msg.payload = lines; }
nodeSend(msg);
else { sendMessage.payload = lines; }
nodeSend(sendMessage);
}
else if (node.format === "lines") {
var m = { payload: spare,
parts: {
index: count,
count: count+1,
ch: ch,
type: type,
id: msg._msgid
}
};
nodeSend(m);
sendMessage.payload = spare;
sendMessage.parts = { index:count, count:count+1, ch:ch, type:type, id:msg._msgid };
nodeSend(sendMessage);
}
else if (getout) { // last chunk same size as high water mark - have to send empty extra packet.
var m = { parts:{index:count, count:count, ch:ch, type:type, id:msg._msgid} };
nodeSend(m);
delete sendMessage.payload;
sendMessage.parts = { parts:{index:count, count:count, ch:ch, type:type, id:msg._msgid} };
nodeSend(sendMessage);
}
nodeDone();
});

View File

@@ -36,7 +36,7 @@
<dt class="optional">followRedirects</dt>
<dd>If set to <code>false</code> prevent following Redirect (HTTP 301).<code>true</code> by default</dd>
<dt class="optional">requestTimeout</dt>
<dd>If set to a positive number, will override the globally set <code>httpRequestTimeout</code> parameter.</dd>
<dd>If set to a positive number of milliseconds, will override the globally set <code>httpRequestTimeout</code> parameter.</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">

View File

@@ -33,6 +33,8 @@
<dd><code>false</code>使https</dd>
<dt class="optional">followRedirects</dt>
<dd><code>false</code><code>true</code></dd>
<dt class="optional">requestTimeout</dt>
<dd>正のミリ秒数をセットすると グローバルに設定された<code>httpRequestTimeout</code></dd>
</dl>
<h3>出力</h3>
<dl class="message-properties">

View File

@@ -27,7 +27,7 @@
"fs-extra": "8.1.0",
"fs.notify": "0.0.4",
"hash-sum": "2.0.0",
"https-proxy-agent": "2.2.2",
"https-proxy-agent": "2.2.3",
"is-utf8": "0.2.1",
"js-yaml": "3.13.1",
"media-typer": "1.1.0",

View File

@@ -224,7 +224,7 @@ Node.prototype._emitInput = function(arg) {
}
);
} catch(err) {
node.error(err,msg);
node.error(err,arg);
}
}
}

View File

@@ -18,7 +18,7 @@
"clone": "2.1.2",
"i18next": "15.1.2",
"json-stringify-safe": "5.0.1",
"jsonata": "1.6.5",
"jsonata": "1.7.0",
"when": "3.7.8"
}
}

View File

@@ -251,7 +251,8 @@ describe('delay Node', function() {
var helperNode1 = helper.getNode("helperNode1");
var receivedMessagesStack = [];
var rate = 1000/aLimit;
// Add a small grace to the calculated delay
var rate = 1000/aLimit + 10;
var receiveTimestamp;

View File

@@ -1192,6 +1192,43 @@ describe('file Nodes', function() {
});
});
it('should read in a file and output split lines with parts and preserve other properties', function(done) {
var flow = [{id:"fileInNode1", type:"file in", name: "fileInNode", filename:fileToTest, format:"lines", wires:[["n2"]]},
{id:"n2", type:"helper"}];
helper.load(fileNode, flow, function() {
var n1 = helper.getNode("fileInNode1");
var n2 = helper.getNode("n2");
var c = 0;
n2.on("input", function(msg) {
try {
msg.should.have.property('payload');
msg.payload.should.be.a.String();
msg.should.have.property('topic',"dujour");
msg.should.have.property('foo',"bar");
msg.should.have.property('parts');
msg.parts.should.have.property('index',c);
msg.parts.should.have.property('type','string');
msg.parts.should.have.property('ch','\n');
if (c === 0) {
msg.payload.should.equal("File message line 1");
}
if (c === 1) {
msg.payload.should.equal("File message line 2");
}
if (c === 2) {
msg.payload.should.equal("");
done();
}
c++;
}
catch(e) {
done(e);
}
});
n1.receive({payload:"",topic:"dujour",foo:"bar"});
});
});
it('should read in a file and output a buffer with parts', function(done) {
var flow = [{id:"fileInNode1", type:"file in", name: "fileInNode", filename:fileToTest, format:"stream", wires:[["n2"]]},
{id:"n2", type:"helper"}];
@@ -1212,6 +1249,28 @@ describe('file Nodes', function() {
});
});
it('should read in a file and output a buffer with parts and preserve other properties', function(done) {
var flow = [{id:"fileInNode1", type:"file in", name: "fileInNode", filename:fileToTest, format:"stream", wires:[["n2"]]},
{id:"n2", type:"helper"}];
helper.load(fileNode, flow, function() {
var n1 = helper.getNode("fileInNode1");
var n2 = helper.getNode("n2");
n2.on("input", function(msg) {
msg.should.have.property('payload');
msg.should.have.property('topic',"dujour");
msg.should.have.property('foo',"bar");
Buffer.isBuffer(msg.payload).should.be.true();
msg.payload.should.have.length(40);
msg.should.have.property('parts');
msg.parts.should.have.property('count',1);
msg.parts.should.have.property('type','buffer');
msg.parts.should.have.property('ch','');
done();
});
n1.receive({payload:"",topic:"dujour",foo:"bar"});
});
});
it('should warn if no filename set', function(done) {
var flow = [{id:"fileInNode1", type:"file in", name: "fileInNode", "format":""}];
helper.load(fileNode, flow, function() {