We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aff0b1c commit 30fa083Copy full SHA for 30fa083
test/integration/connection/test-invalid-credentials.js
@@ -0,0 +1,26 @@
1
+var common = require('../../common');
2
+var assert = require('assert');
3
+
4
+process.on('uncaughtException', function (err) {
5
+ assert.ifError(err);
6
+});
7
8
+var connection1 = common.createConnection({
9
+ username: 'wtf',
10
+ password: 'lol'
11
12
13
+// error will NOT bubble up to process level if `on` is used
14
+connection1.on('error', function (err) {
15
+ assert.ok(err);
16
17
18
+var connection2 = common.createConnection({
19
20
21
22
23
+// error will bubble up to process level if `once` is used
24
+connection2.once('error', function (err) {
25
26
0 commit comments