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:
Christopher Hiller
2018-04-23 04:37:26 -07:00
committed by Nick O'Leary
parent 25345302e8
commit e1195ac00a
33 changed files with 267 additions and 194 deletions

View File

@@ -130,15 +130,20 @@ describe('tail Node', function() {
});
}
it('should throw an error if run on Windows', function(done) {
it('should throw an error if run on Windows', function() {
// Stub os platform so we can make it look like windows
var os = require('os');
var spy = sinon.stub(os, 'platform', function(arg) { return("windows"); });
/*jshint immed: false */
(function() { tailNode("1234"); }).should.throw();
os.platform.restore();
done();
try {
(function() { tailNode("1234"); }).should.throw();
} catch (err) {
throw err;
}
finally {
os.platform.restore();
}
});
/*

View File

@@ -28,7 +28,7 @@ describe('file Nodes', function() {
var resourcesDir = path.join(__dirname,"..","..","..","resources");
var fileToTest = path.join(resourcesDir,"50-file-test-file.txt");
var wait = 150;
var wait = 250;
beforeEach(function(done) {
//fs.writeFileSync(fileToTest, "File message line 1\File message line 2\n");