mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
fix websocket feedback test - now doesn't spin
This commit is contained in:
@@ -481,7 +481,7 @@ describe('websocket Node', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('should feedback', function(done) {
|
||||
it('should NOT feedback more than once', function(done) {
|
||||
var flow = [
|
||||
{ id: "server", type: "websocket-listener", path: "/ws", wholemsg: "true" },
|
||||
{ id: "client", type: "websocket-client", path: getWsUrl("/ws"), wholemsg: "true" },
|
||||
@@ -497,11 +497,13 @@ describe('websocket Node', function() {
|
||||
});
|
||||
var acc = 0;
|
||||
helper.getNode("output").on("input", function(msg) {
|
||||
if (acc++ > 20) {
|
||||
helper.clearFlows();
|
||||
done();
|
||||
}
|
||||
acc = acc + 1;
|
||||
});
|
||||
setTimeout( function() {
|
||||
acc.should.equal(1);
|
||||
helper.clearFlows();
|
||||
done();
|
||||
}, 250);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user