Skip to content

Commit

Permalink
Fix test cases being too specific.
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurschreiber committed Sep 15, 2024
1 parent 97ba6df commit 6c1232c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/unit/connection-failure-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,9 @@ describe('Connection failure handling', function() {
connection.close();

assert.instanceOf(err, ConnectionError);
assert.strictEqual('Connection lost - socket hang up', err.message);

assert.instanceOf(err.cause, Error);
assert.strictEqual('socket hang up', err.cause.message);
// We're not checking the actual error message here.
// The error message will end up being different between operating systems.

done();
});
Expand Down Expand Up @@ -210,10 +209,9 @@ describe('Connection failure handling', function() {
connection.close();

assert.instanceOf(err, ConnectionError);
assert.strictEqual('Connection lost - socket hang up', err.message);

assert.instanceOf(err.cause, Error);
assert.strictEqual('socket hang up', err.cause.message);
// We're not checking the actual error message here.
// The error message will end up being different between operating systems.

done();
});
Expand Down

0 comments on commit 6c1232c

Please sign in to comment.