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', () => {
355
355
} )
356
356
} )
357
357
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 )
365
364
} )
366
365
367
366
it ( 'should fail to run query for unreachable bookmark' , done => {
@@ -377,7 +376,10 @@ describe('transaction', () => {
377
376
expectValidLastBookmark ( session )
378
377
379
378
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 ( )
381
383
tx2 . run ( 'CREATE ()' ) . catch ( error => {
382
384
const message = error . message
383
385
const expectedPrefix =
You can’t perform that action at this time.
0 commit comments