DEBUG: add debug to trigger test

This commit is contained in:
Nick O'Leary 2019-10-28 11:33:56 +00:00
parent 3a1d0f3695
commit cfffcae263
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 6 additions and 2 deletions

View File

@ -64,7 +64,8 @@ module.exports = function(grunt) {
},
all: { src: ["test/unit/_spec.js","test/unit/**/*_spec.js","test/nodes/**/*_spec.js"] },
core: { src: ["test/unit/_spec.js","test/unit/**/*_spec.js"]},
nodes: { src: ["test/nodes/**/*_spec.js"]}
nodes: { src: ["test/nodes/**/*_spec.js"]},
trouble: {src: ["test/nodes/core/function/89-trigger_spec.js"]}
},
jshint: {
options: {
@ -586,7 +587,7 @@ module.exports = function(grunt) {
grunt.registerTask('default',
'Builds editor content then runs code style checks and unit tests on all components',
['build','verifyPackageDependencies','jshint:editor','mocha_istanbul:all']);
['build','verifyPackageDependencies','jshint:editor','mocha_istanbul:trouble']);
grunt.registerTask('test-core',
'Runs code style check and unit tests on core runtime code',

View File

@ -585,6 +585,7 @@ describe('trigger node', function() {
var n2 = helper.getNode("n2");
var c = 0;
n2.on("input", function(msg) {
console.log(Date.now(),"< got",msg.payload);
try {
msg.should.have.a.property("payload", true);
c += 1;
@ -592,9 +593,11 @@ describe('trigger node', function() {
catch(err) { done(err); }
});
setTimeout( function() {
console.log(Date.now(),"! checking",c)
c.should.equal(1); // should only have had one output.
done();
},90);
console.log(Date.now(),"> emit");
n1.emit("input", {payload:null});
});
});