@@ -571,7 +571,7 @@ describe('#integration-rx summary', () => {
571571 . toPromise ( )
572572 expect ( summary ) . toBeDefined ( )
573573 expect ( summary . hasPlan ( ) ) . toBeTruthy ( )
574- expect ( summary . plan . operatorType ) . toBe ( 'ProduceResults' )
574+ expect ( summary . plan . operatorType ) . toContain ( 'ProduceResults' )
575575 expect ( summary . plan . identifiers ) . toEqual ( [ 'n' ] )
576576 expect ( summary . hasProfile ( ) ) . toBeFalsy ( )
577577 expect ( summary . profile ) . toBeFalsy ( )
@@ -592,10 +592,10 @@ describe('#integration-rx summary', () => {
592592 . toPromise ( )
593593 expect ( summary ) . toBeDefined ( )
594594 expect ( summary . hasPlan ( ) ) . toBeTruthy ( )
595- expect ( summary . plan . operatorType ) . toBe ( 'ProduceResults' )
595+ expect ( summary . plan . operatorType ) . toContain ( 'ProduceResults' )
596596 expect ( summary . plan . identifiers ) . toEqual ( [ 'n' ] )
597597 expect ( summary . hasProfile ( ) ) . toBeTruthy ( )
598- expect ( summary . profile . operatorType ) . toBe ( 'ProduceResults' )
598+ expect ( summary . profile . operatorType ) . toContain ( 'ProduceResults' )
599599 expect ( summary . profile . identifiers ) . toEqual ( [ 'n' ] )
600600 }
601601
@@ -727,25 +727,18 @@ describe('#integration-rx summary', () => {
727727 }
728728
729729 async function dropConstraintsAndIndices ( driver ) {
730- function getName ( record ) {
731- const obj = record . toObject ( )
732- const name = obj . description || obj . name
733- if ( ! name ) {
734- throw new Error ( 'unable to identify name of the constraint/index' )
735- }
736- return name
737- }
738-
739730 const session = driver . session ( )
740731 try {
741732 const constraints = await session . run ( 'CALL db.constraints()' )
742733 for ( let i = 0 ; i < constraints . records . length ; i ++ ) {
743- await session . run ( `DROP ${ getName ( constraints . records [ i ] ) } ` )
734+ const name = constraints . records [ i ] . toObject ( ) . name
735+ await session . run ( 'DROP CONSTRAINT ' + name ) // ${getName(constraints.records[i])}`)
744736 }
745737
746738 const indices = await session . run ( 'CALL db.indexes()' )
747739 for ( let i = 0 ; i < indices . records . length ; i ++ ) {
748- await session . run ( `DROP INDEX ${ getName ( indices . records [ i ] ) } ` )
740+ const name = indices . records [ i ] . toObject ( ) . name
741+ await session . run ( 'DROP INDEX ' + name ) // ${getName(constraints.records[i])}`)
749742 }
750743 } finally {
751744 await session . close ( )
0 commit comments