jstests/replsets/server_election_metrics.js
// reason counter and that it has the subfields 'called' and 'successful'.
reason counter and that it has the subfields 'called' and 'successful'.
reason counter and that it has the subfields ' called ' and ' successful ' .
function verifyElectionReasonCounterFields(serverStatusResponse, fieldName) {
    const field = verifyElectionMetricsField(serverStatusResponse, fieldName);
    assert(field.hasOwnProperty("called"),
           () => (`The '${fieldName}' field in the 'electionMetrics' serverStatus section did \
not have the 'called' field: \n${tojson(field)}`));
    assert(field.hasOwnProperty("successful"),
           () => (`The '${fieldName}' field in the 'electionMetrics' serverStatus section did \
not have the 'successful' field: \n${tojson(field)}`));
}
function verifyElectionReasonCounterFields ( serverStatusResponse , fieldName ) { const field = verifyElectionMetricsField ( serverStatusResponse , fieldName ) ; assert ( field . hasOwnProperty ( "called" ) , ( ) => ( ` ${ fieldName } \
 \n ${ tojson ( field ) } ` ) ) ; assert ( field . hasOwnProperty ( "successful" ) , ( ) => ( ` ${ fieldName } \
 \n ${ tojson ( field ) } ` ) ) ; }
reason counter and that it has the subfields 'called' and 'successful'.
reason counter and that it has the subfields ' called ' and ' successful ' .