@@ -647,19 +647,15 @@ describe('BSON e2e', function () {
647647 `use(${ JSON . stringify ( dbName ) } ); print(db.coll.findOne()); 0` ,
648648 ] ,
649649 } ) ;
650- await shell . waitForSuccessfulExit ( ) ;
651- checkForDeepOutput ( shell . output , false ) ;
652- shell . assertNoErrors ( ) ;
650+ checkForDeepOutput ( await shell . waitForCleanOutput ( ) , false ) ;
653651 shell = this . startTestShell ( {
654652 args : [
655653 await testServer . connectionString ( ) ,
656654 '--eval' ,
657655 `print(${ deepAndNestedDefinition } ); 0` ,
658656 ] ,
659657 } ) ;
660- await shell . waitForSuccessfulExit ( ) ;
661- checkForDeepOutput ( shell . output , false ) ;
662- shell . assertNoErrors ( ) ;
658+ checkForDeepOutput ( await shell . waitForCleanOutput ( ) , false ) ;
663659 } ) ;
664660
665661 it ( 'inspect full objects in non-interactive mode for final output' , async function ( ) {
@@ -671,19 +667,15 @@ describe('BSON e2e', function () {
671667 `use(${ JSON . stringify ( dbName ) } ); db.coll.findOne();` ,
672668 ] ,
673669 } ) ;
674- await shell . waitForSuccessfulExit ( ) ;
675- checkForDeepOutput ( shell . output , true ) ;
676- shell . assertNoErrors ( ) ;
670+ checkForDeepOutput ( await shell . waitForCleanOutput ( ) , true ) ;
677671 shell = this . startTestShell ( {
678672 args : [
679673 await testServer . connectionString ( ) ,
680674 '--eval' ,
681675 deepAndNestedDefinition ,
682676 ] ,
683677 } ) ;
684- await shell . waitForSuccessfulExit ( ) ;
685- checkForDeepOutput ( shell . output , true ) ;
686- shell . assertNoErrors ( ) ;
678+ checkForDeepOutput ( await shell . waitForCleanOutput ( ) , true ) ;
687679 } ) ;
688680
689681 it ( 'can explicitly disable full-depth nesting (non-interactive mode)' , async function ( ) {
@@ -696,9 +688,7 @@ describe('BSON e2e', function () {
696688 `use(${ JSON . stringify ( dbName ) } ); db.coll.findOne();` ,
697689 ] ,
698690 } ) ;
699- await shell . waitForSuccessfulExit ( ) ;
700- checkForDeepOutput ( shell . output , false ) ;
701- shell . assertNoErrors ( ) ;
691+ checkForDeepOutput ( await shell . waitForCleanOutput ( ) , false ) ;
702692 shell = this . startTestShell ( {
703693 args : [
704694 await testServer . connectionString ( ) ,
@@ -707,9 +697,7 @@ describe('BSON e2e', function () {
707697 deepAndNestedDefinition ,
708698 ] ,
709699 } ) ;
710- await shell . waitForSuccessfulExit ( ) ;
711- checkForDeepOutput ( shell . output , false ) ;
712- shell . assertNoErrors ( ) ;
700+ checkForDeepOutput ( await shell . waitForCleanOutput ( ) , false ) ;
713701 } ) ;
714702
715703 it ( 'can parse serverStatus back to its original form' , async function ( ) {
0 commit comments