Has anyone had their mocha tests break after upgrading to v0.10.0? I'm not
sure where to start
Here's what replicates problem on my machine (MacOSX):
mocha: "1.7.4"
// canary.test.js
"use strict";
var assert = require('assert'),
http = require('http');
var test = function test(req, res) {
res.writeHead(200);
res.end();
};
describe( 'canary', function () {
let OPTIONS, SERVER, TEST_HARNESS;
beforeEach(function(done) {
OPTIONS = {
hostname : 'localhost',
port : 10211,
path : '/',
method : 'GET'
};
SERVER = {};
TEST_HARNESS = http.createServer(test.bind(SERVER));
TEST_HARNESS.listen(10211, function() {
done();
});
});
afterEach(function(done) {
TEST_HARNESS.close(function() {
done();
});
});
it('should return 200', function(done) {
let req = http.request(OPTIONS, function(response) {
assert.equal(response.statusCode, 200);
done();
});
req.end();
});
});
When I run it under node v0.8.22, I get:
./node_modules/.bin/mocha --harmony canary.test.js
1 test complete (10 ms)
When I run it under node v0.10.0, I get:
./node_modules/.bin/mocha --harmony canary.test.js
✖ 1 of 1 test failed:
1) canary "after each" hook:
Error: timeout of 2000ms exceeded
at null.<anonymous>
(/blah/blah/node_modules/mocha/lib/runnable.js:167:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.