1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add debug for eventEmitSpy

Debugging a travis-only build failure
This commit is contained in:
Nick O'Leary 2014-08-01 22:19:33 +01:00
parent 882b593ba4
commit d6c5f9b57f

View File

@ -151,7 +151,7 @@ describe('NodeRegistry', function() {
list[0].should.have.property("enabled",true); list[0].should.have.property("enabled",true);
list[0].should.not.have.property("err"); list[0].should.not.have.property("err");
eventEmitSpy.calledTwice.should.be.true; eventEmitSpy.callCount.should.equal(2);
eventEmitSpy.firstCall.args[0].should.be.equal("node-icon-dir"); eventEmitSpy.firstCall.args[0].should.be.equal("node-icon-dir");
eventEmitSpy.firstCall.args[1].should.be.equal(__dirname+"/resources/NestedDirectoryNode/NestedNode/icons"); eventEmitSpy.firstCall.args[1].should.be.equal(__dirname+"/resources/NestedDirectoryNode/NestedNode/icons");
@ -161,6 +161,7 @@ describe('NodeRegistry', function() {
done(); done();
}).catch(function(e) { }).catch(function(e) {
console.log(eventEmitSpy);
done(e); done(e);
}).finally(function() { }).finally(function() {
eventEmitSpy.restore(); eventEmitSpy.restore();