File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -479,7 +479,7 @@ describe('Experimental Service', () => {
479479 client . close ( ) ;
480480 } ) ;
481481
482- it ( 'can bulk import relationships' , ( ) => {
482+ it ( 'can bulk import relationships' , ( done ) => {
483483 const { promises : client } = NewClient (
484484 token ,
485485 'localhost:50051' ,
@@ -488,14 +488,16 @@ describe('Experimental Service', () => {
488488
489489 const writeStream = client . bulkImportRelationships ( ( err , value ) => {
490490 if ( err ) {
491- fail ( err ) ;
491+ done . fail ( err ) ;
492492 }
493493
494494 expect ( value ?. numLoaded ) . toEqual ( '2' ) ;
495+ client . close ( ) ;
496+ done ( ) ;
495497 } ) ;
496498
497499 writeStream . on ( 'error' , ( e ) => {
498- fail ( e ) ;
500+ done . fail ( e ) ;
499501 } ) ;
500502
501503 const resource = ObjectReference . create ( {
@@ -530,7 +532,6 @@ describe('Experimental Service', () => {
530532 ) ;
531533
532534 writeStream . end ( ) ;
533- client . close ( ) ;
534535 } ) ;
535536
536537 it ( 'can bulk export relationships' , async ( ) => {
Original file line number Diff line number Diff line change @@ -505,7 +505,7 @@ describe("Experimental Service", () => {
505505 } ) ;
506506 } ) ;
507507
508- it ( "can bulk import relationships" , ( ) => {
508+ it ( "can bulk import relationships" , ( done ) => {
509509 const client = NewClient (
510510 token ,
511511 "localhost:50051" ,
@@ -514,14 +514,16 @@ describe("Experimental Service", () => {
514514
515515 const writeStream = client . bulkImportRelationships ( ( err , value ) => {
516516 if ( err ) {
517- fail ( err ) ;
517+ done . fail ( err ) ;
518518 }
519519
520520 expect ( value ?. numLoaded ) . toEqual ( "2" ) ;
521+ client . close ( ) ;
522+ done ( ) ;
521523 } ) ;
522524
523525 writeStream . on ( "error" , ( e ) => {
524- fail ( e ) ;
526+ done . fail ( e ) ;
525527 } ) ;
526528
527529 const resource = ObjectReference . create ( {
@@ -557,7 +559,6 @@ describe("Experimental Service", () => {
557559 ) ;
558560
559561 writeStream . end ( ) ;
560- client . close ( ) ;
561562 } ) ;
562563
563564 it ( "can bulk export relationships" , ( done ) => {
You can’t perform that action at this time.
0 commit comments