Skip to content

Commit 7e0acb6

Browse files
committed
tests: group auth unit tests together
1 parent f83d270 commit 7e0acb6

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

test/unit/connection/test-old-password.js test/unit/connection/test-auth-old-password.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@ var Crypto = require('crypto');
1111
var random = Crypto.pseudoRandomBytes || Crypto.randomBytes; // Depends on node.js version
1212
var server = common.createFakeServer();
1313

14-
var connected;
15-
server.listen(common.fakeServerPort, function(err) {
16-
if (err) throw err;
17-
18-
connection.connect(function(err, result) {
19-
if (err) throw err;
20-
21-
connected = result;
14+
server.listen(common.fakeServerPort, function (err) {
15+
assert.ifError(err);
2216

17+
connection.connect(function (err) {
18+
assert.ifError(err);
2319
connection.destroy();
2420
server.destroy();
2521
});
@@ -43,7 +39,3 @@ server.on('connection', function(incomingConnection) {
4339
});
4440
});
4541
});
46-
47-
process.on('exit', function() {
48-
assert.equal(connected.fieldCount, 0);
49-
});

0 commit comments

Comments
 (0)