mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix test for template node for persistable context
This commit is contained in:
parent
cecea318da
commit
5847f92bef
@ -36,6 +36,9 @@ describe('template node', function() {
|
||||
function initContext(done) {
|
||||
Context.init({
|
||||
contextStorage: {
|
||||
memory0: { // do not use (for excluding effect fallback)
|
||||
module: "memory"
|
||||
},
|
||||
memory1: {
|
||||
module: "memory"
|
||||
},
|
||||
@ -337,7 +340,7 @@ describe('template node', function() {
|
||||
msg.should.have.property('topic', 'bar');
|
||||
msg.should.have.property('payload', 'foo');
|
||||
// result is in flow context
|
||||
n2.context().flow.get("payload", "memory", function (err, val) {
|
||||
n2.context().flow.get("payload", "memory1", function (err, val) {
|
||||
val.should.equal("payload=foo");
|
||||
done();
|
||||
});
|
||||
@ -375,7 +378,7 @@ describe('template node', function() {
|
||||
msg.should.have.property('topic', 'bar');
|
||||
msg.should.have.property('payload', 'foo');
|
||||
// result is in global context
|
||||
n2.context().global.get("payload", "memory", function (err, val) {
|
||||
n2.context().global.get("payload", "memory1", function (err, val) {
|
||||
val.should.equal("payload=foo");
|
||||
done();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user