Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mockAsync(function() {
should.deepEqual(testid, {
s: 0,
r: {
app: "mock-MTO_XYZ",
"ver": 1
},
t: 0.001
});
}); // mock async
})
mockAsync(function() {
should.deepEqual(testid, {
s: 0,
r: {
app: "mock-MTO_FPD",
"ver": 1
},
t: 0.001
});
}); // mock async
})
n2.on("input", function(msg) {
try {
if (rval) {
msg.should.have.property("payload");
should.deepEqual(msg.payload, rval);
}
else {
msg.should.have.property("payload", val);
}
delete process.env[val];
done();
}
catch(err) { done(err); }
});
n1.emit("input", {payload:null});
n2.on("input", function (msg) {
try {
msg.should.have.property("topic", "t1");
if (rval) {
msg.should.have.property("payload");
should.deepEqual(msg.payload, rval);
}
else {
msg.should.have.property("payload", val);
}
done();
} catch (err) {
done(err);
}
});
n1.receive({});
function(err, result) {
should.not.exist(err);
should.deepEqual(result.rows, want);
callback();
}
);