Skip to content

Commit aea611e

Browse files
committed
Fix how underlying connection is fetched in the test
1 parent 8f5810f commit aea611e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/internal/node/direct.driver.boltkit.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
*/
1919

20-
import neo4j, { Neo4jError } from '../../../src/v1'
20+
import neo4j from '../../../src/v1'
2121
import { READ, WRITE } from '../../../src/v1/driver'
2222
import boltStub from '../bolt-stub'
2323
import { newError, SERVICE_UNAVAILABLE } from '../../../src/v1/error'
@@ -447,7 +447,9 @@ describe('direct driver with stub server', () => {
447447
expect(records[1].get(0)).toBe('Alice')
448448
expect(records[2].get(0)).toBe('Tina')
449449

450-
const connection = driver._openConnections[0]
450+
expect(Object.keys(driver._openConnections).length).toBe(1)
451+
452+
const connection = Object.values(driver._openConnections)[0]
451453
session.close(() => {
452454
// generate a fake fatal error
453455
connection._handleFatalError(

0 commit comments

Comments
 (0)