@@ -62,7 +62,7 @@ describe('Connection', () => {
62
62
const driverSpy = spy ( neo4j , 'driver' ) ;
63
63
const connection = new Connection ( neo4jUrl , neo4jCredentials ) ;
64
64
65
- expect ( driverSpy . calledOnce ) ;
65
+ expect ( driverSpy . calledOnce ) . to . equal ( true ) ;
66
66
67
67
await connection . close ( ) ;
68
68
driverSpy . restore ( ) ;
@@ -93,27 +93,27 @@ describe('Connection', () => {
93
93
describe ( '#close' , ( ) => {
94
94
it ( 'should close the driver' , async ( ) => {
95
95
await connection . close ( ) ;
96
- expect ( driverCloseSpy . calledOnce ) ;
96
+ expect ( driverCloseSpy . calledOnce ) . to . equal ( true ) ;
97
97
} ) ;
98
98
99
99
it ( 'should only close the driver once' , async ( ) => {
100
100
await connection . close ( ) ;
101
101
await connection . close ( ) ;
102
- expect ( driverCloseSpy . calledOnce ) ;
102
+ expect ( driverCloseSpy . calledOnce ) . to . equal ( true ) ;
103
103
} ) ;
104
104
} ) ;
105
105
106
106
describe ( '#session' , ( ) => {
107
107
it ( 'should use the driver to create a session' , ( ) => {
108
108
connection . session ( ) ;
109
- expect ( driverSessionStub . calledOnce ) ;
109
+ expect ( driverSessionStub . calledOnce ) . to . equal ( true ) ;
110
110
} ) ;
111
111
112
112
it ( 'should return null if the connection has been closed' , async ( ) => {
113
113
await connection . close ( ) ;
114
114
const result = connection . session ( ) ;
115
115
116
- expect ( driverSessionStub . notCalled ) ;
116
+ expect ( driverSessionStub . notCalled ) . to . equal ( true ) ;
117
117
expect ( result ) . to . equal ( null ) ;
118
118
} ) ;
119
119
} ) ;
@@ -143,15 +143,15 @@ describe('Connection', () => {
143
143
144
144
const promise = connection . run ( query ) ;
145
145
await expect ( promise ) . to . be . fulfilled . then ( ( ) => {
146
- expect ( sessionRunSpy . calledOnce ) ;
146
+ expect ( sessionRunSpy . calledOnce ) . to . equal ( true ) ;
147
147
expect ( sessionRunSpy . calledWith ( 'RETURN 1' , params ) ) ;
148
148
} ) ;
149
149
} ) ;
150
150
151
151
it ( 'should close the session after running a query' , async ( ) => {
152
152
const promise = connection . run ( ( new Query ( ) ) . raw ( 'RETURN 1' ) ) ;
153
153
await expect ( promise ) . to . be . fulfilled
154
- . then ( ( ) => expect ( sessionCloseSpy . calledOnce ) ) ;
154
+ . then ( ( ) => expect ( sessionCloseSpy . calledOnce ) . to . equal ( true ) ) ;
155
155
} ) ;
156
156
157
157
it ( 'should close the session when run() throws' , async ( ) => {
@@ -180,7 +180,7 @@ describe('Connection', () => {
180
180
try {
181
181
await connection . run ( new Query ( ) . raw ( 'RETURN a' ) ) ;
182
182
} catch ( e ) { }
183
- expect ( sessionCloseStub . calledOnce ) ;
183
+ expect ( sessionCloseStub . calledOnce ) . to . equal ( true ) ;
184
184
} ) ;
185
185
} ) ;
186
186
} ) ;
@@ -257,7 +257,7 @@ describe('Connection', () => {
257
257
. toPromise ( )
258
258
. then ( ( ) => {
259
259
expect ( count ) . to . equal ( records . length ) ;
260
- expect ( sessionRunSpy . calledOnce ) ;
260
+ expect ( sessionRunSpy . calledOnce ) . to . equal ( true ) ;
261
261
expect ( sessionRunSpy . calledWith ( query . build ( ) , params ) ) ;
262
262
} ) ;
263
263
} ) ;
@@ -277,7 +277,7 @@ describe('Connection', () => {
277
277
observable . subscribe ( {
278
278
next : ( ) => expect . fail ( null , null , 'Observable should not emit any items' ) ,
279
279
error ( ) {
280
- expect ( sessionCloseSpy . calledOnce ) ;
280
+ expect ( sessionCloseSpy . calledOnce ) . to . equal ( true ) ;
281
281
done ( ) ;
282
282
} ,
283
283
complete : ( ) => expect . fail ( null , null , 'Observable should not complete without an error' ) ,
0 commit comments