Skip to content

Commit 167a139

Browse files
committed
Improve transaction terminated error assertion
Message has changed in neo4j 3.4, which made couple session tests fail.
1 parent 29e7752 commit 167a139

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/v1/session.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,9 @@ describe('session', () => {
10841084
}
10851085

10861086
function expectTransactionTerminatedError(error) {
1087-
expect(error.message.toLowerCase().indexOf('transaction terminated') >= 0).toBeTruthy();
1087+
const message = error.message.toLowerCase();
1088+
expect(message.indexOf('transaction')).not.toBeLessThan(0);
1089+
expect(message.indexOf('terminated')).not.toBeLessThan(0);
10881090
}
10891091

10901092
function readAllNodeIds() {

0 commit comments

Comments
 (0)