mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
fix many test problems (#1677)
* fix many test problems - adds [stoppable](https://npm.im/stoppable) to force-stop net & http servers - upgrades to latest mocha - much cleanup of servers - some removal of useless code Signed-off-by: Christopher Hiller <boneskull@boneskull.com> * increase wait time to hack at race condition * PoC with fork of stoppable Signed-off-by: Christopher Hiller <boneskull@boneskull.com> * fix custom stoppable url for newer npm * make travis go faster; attempt to avoid npm troubles * fix coveralls executable path * add extra time for flake to trigger spec Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
This commit is contained in:
committed by
Nick O'Leary
parent
25345302e8
commit
e1195ac00a
@@ -24,6 +24,10 @@ describe('inject node', function() {
|
||||
helper.startServer(done);
|
||||
});
|
||||
|
||||
after(function(done) {
|
||||
helper.stopServer(done);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
helper.unload();
|
||||
});
|
||||
|
@@ -25,6 +25,10 @@ describe('debug node', function() {
|
||||
helper.startServer(done);
|
||||
});
|
||||
|
||||
after(function(done) {
|
||||
helper.stopServer(done);
|
||||
});
|
||||
|
||||
beforeEach(function (done) {
|
||||
setTimeout(function() {
|
||||
done();
|
||||
|
@@ -24,6 +24,10 @@ describe('link Node', function() {
|
||||
helper.startServer(done);
|
||||
});
|
||||
|
||||
after(function(done) {
|
||||
helper.stopServer(done);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
helper.unload();
|
||||
});
|
||||
|
@@ -24,6 +24,10 @@ describe('function node', function() {
|
||||
helper.startServer(done);
|
||||
});
|
||||
|
||||
after(function(done) {
|
||||
helper.stopServer(done);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
helper.unload();
|
||||
});
|
||||
|
@@ -24,6 +24,10 @@ describe('template node', function() {
|
||||
helper.startServer(done);
|
||||
});
|
||||
|
||||
after(function(done) {
|
||||
helper.stopServer(done);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
helper.unload();
|
||||
});
|
||||
|
@@ -304,11 +304,11 @@ describe('trigger node', function() {
|
||||
}
|
||||
else {
|
||||
msg.should.have.a.property("payload", "bar");
|
||||
spy.restore();
|
||||
RED.util.evaluateNodeProperty.restore();
|
||||
done();
|
||||
}
|
||||
}
|
||||
catch(err) { spy.restore(); done(err); }
|
||||
catch(err) { RED.util.evaluateNodeProperty.restore(); done(err); }
|
||||
});
|
||||
n1.emit("input", {payload:null});
|
||||
});
|
||||
@@ -384,6 +384,7 @@ describe('trigger node', function() {
|
||||
});
|
||||
|
||||
it('should be able to extend the delay', function(done) {
|
||||
this.timeout(5000); // add extra time for flake
|
||||
var spy = sinon.stub(RED.util, 'evaluateNodeProperty',
|
||||
function(arg1, arg2, arg3, arg4) { return arg1; }
|
||||
);
|
||||
|
Reference in New Issue
Block a user