File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -355,13 +355,12 @@ describe('transaction', () => {
355355 } )
356356 } )
357357
358- it ( 'should fail for invalid bookmark' , done => {
359- const invalidBookmark = 'hi, this is an invalid bookmark'
360- const tx = session . beginTransaction ( invalidBookmark )
361- tx . run ( 'RETURN 1' ) . catch ( error => {
362- expect ( error . code ) . toBe ( 'Neo.ClientError.Transaction.InvalidBookmark' )
363- done ( )
364- } )
358+ it ( 'should throw when provided string (bookmark) parameter' , ( ) => {
359+ expect ( ( ) => session . beginTransaction ( 'bookmark' ) ) . toThrowError ( TypeError )
360+ } )
361+
362+ it ( 'should throw when provided string[] (bookmark) parameter' , ( ) => {
363+ expect ( ( ) => session . beginTransaction ( [ 'bookmark' ] ) ) . toThrowError ( TypeError )
365364 } )
366365
367366 it ( 'should fail to run query for unreachable bookmark' , done => {
@@ -377,7 +376,10 @@ describe('transaction', () => {
377376 expectValidLastBookmark ( session )
378377
379378 const unreachableBookmark = session . lastBookmark ( ) + '0'
380- const tx2 = session . beginTransaction ( unreachableBookmark )
379+ const session2 = driver . session ( {
380+ bookmarks : [ unreachableBookmark ]
381+ } )
382+ const tx2 = session2 . beginTransaction ( )
381383 tx2 . run ( 'CREATE ()' ) . catch ( error => {
382384 const message = error . message
383385 const expectedPrefix =
You can’t perform that action at this time.
0 commit comments