@@ -53,13 +53,13 @@ describe('Entities Database Tests', function() {
53
53
executionStats . nReturned . should . equal ( 1 ) ;
54
54
executionStats . totalKeysExamined . should . equal ( 1 ) ;
55
55
executionStats . totalDocsExamined . should . equal ( 1 ) ;
56
- const { executionStages : targetStage } = executionStats ;
56
+ let { executionStages : targetStage } = executionStats ;
57
57
// only mongodb 8+ has 'EXPRESS_IXSCAN'
58
58
if ( targetStage . stage === 'EXPRESS_IXSCAN' ) {
59
59
targetStage . keyPattern . should . eql (
60
60
'{ entity.internalId: 1 }' ) ;
61
61
} else {
62
- targetStage = executionStages . inputStage . inputStage ;
62
+ targetStage = executionStats . executionStages . inputStage . inputStage ;
63
63
targetStage . stage . should . equal ( 'IXSCAN' ) ;
64
64
targetStage . keyPattern . should . eql (
65
65
{ 'entity.internalId' : 1 } ) ;
@@ -88,13 +88,13 @@ describe('Entities Database Tests', function() {
88
88
executionStats . nReturned . should . equal ( 1 ) ;
89
89
executionStats . totalKeysExamined . should . equal ( 1 ) ;
90
90
executionStats . totalDocsExamined . should . equal ( 1 ) ;
91
- const { executionStages : targetStage } = executionStats ;
91
+ let { executionStages : targetStage } = executionStats ;
92
92
// only mongodb 8+ has 'EXPRESS_IXSCAN'
93
93
if ( targetStage . stage === 'EXPRESS_IXSCAN' ) {
94
94
targetStage . keyPattern . should . eql (
95
95
'{ entity.internalId: 1 }' ) ;
96
96
} else {
97
- targetStage = executionStages . inputStage . inputStage ;
97
+ targetStage = executionStats . executionStages . inputStage . inputStage ;
98
98
targetStage . stage . should . equal ( 'IXSCAN' ) ;
99
99
targetStage . keyPattern . should . eql (
100
100
{ 'entity.internalId' : 1 } ) ;
@@ -146,13 +146,13 @@ describe('Entities Database Tests', function() {
146
146
executionStats . nReturned . should . equal ( 1 ) ;
147
147
executionStats . totalKeysExamined . should . equal ( 1 ) ;
148
148
executionStats . totalDocsExamined . should . equal ( 1 ) ;
149
- const { executionStages : targetStage } = executionStats ;
149
+ let { executionStages : targetStage } = executionStats ;
150
150
// only mongodb 8+ has 'EXPRESS_IXSCAN'
151
151
if ( targetStage . stage === 'EXPRESS_IXSCAN' ) {
152
152
targetStage . keyPattern . should . eql (
153
153
'{ entity.internalId: 1 }' ) ;
154
154
} else {
155
- targetStage = executionStages . inputStage . inputStage ;
155
+ targetStage = executionStats . executionStages . inputStage . inputStage ;
156
156
targetStage . stage . should . equal ( 'IXSCAN' ) ;
157
157
targetStage . keyPattern . should . eql (
158
158
{ 'entity.internalId' : 1 } ) ;
0 commit comments