@@ -3,7 +3,7 @@ import { expect } from 'chai';
33import { MongoClient , SeverityLevel } from '../../mongodb' ;
44
55describe ( 'Feature Flags' , ( ) => {
6- describe ( '@@mdb.skipPingOnConnect ' , ( ) => {
6+ describe ( '__skipPingOnConnect ' , ( ) => {
77 beforeEach ( function ( ) {
88 if ( process . env . AUTH !== 'auth' ) {
99 this . currentTest . skipReason = 'ping count relies on auth to be enabled' ;
@@ -23,8 +23,7 @@ describe('Feature Flags', () => {
2323 ] ;
2424 for ( const { description, value, expectEvents } of tests ) {
2525 it ( description , async function ( ) {
26- const options =
27- value === undefined ? { } : { [ __skipPingOnConnect ] : value } ;
26+ const options = value === undefined ? { } : { __skipPingOnConnect : value } ;
2827 const client = this . configuration . newClient ( { } , { ...options , monitorCommands : true } ) ;
2928 const events = [ ] ;
3029 client . on ( 'commandStarted' , event => events . push ( event ) ) ;
@@ -46,9 +45,8 @@ describe('Feature Flags', () => {
4645 } ) ;
4746
4847 // TODO(NODE-5672): Release Standardized Logger
49- describe ( '@@mdb.enableMongoLogger ' , ( ) => {
48+ describe ( '__enableMongoLogger ' , ( ) => {
5049 let cachedEnv ;
51- const loggerFeatureFlag = __enableMongoLogger ;
5250
5351 before ( ( ) => {
5452 cachedEnv = process . env ;
@@ -66,7 +64,7 @@ describe('Feature Flags', () => {
6664
6765 it ( 'enables logging for the specified component' , ( ) => {
6866 const client = new MongoClient ( 'mongodb://localhost:27017' , {
69- [ loggerFeatureFlag ] : true
67+ __enableMongoLogger : true
7068 } ) ;
7169 expect ( client . mongoLogger ?. componentSeverities ) . to . have . property (
7270 'command' ,
@@ -82,7 +80,7 @@ describe('Feature Flags', () => {
8280
8381 it ( 'does not create logger' , ( ) => {
8482 const client = new MongoClient ( 'mongodb://localhost:27017' , {
85- [ loggerFeatureFlag ] : true
83+ __enableMongoLogger : true
8684 } ) ;
8785 expect ( client . mongoLogger ) . to . not . exist ;
8886 } ) ;
@@ -98,7 +96,7 @@ describe('Feature Flags', () => {
9896
9997 it ( 'does not instantiate logger' , ( ) => {
10098 const client = new MongoClient ( 'mongodb://localhost:27017' , {
101- [ loggerFeatureFlag ] : featureFlagValue
99+ __enableMongoLogger : featureFlagValue
102100 } ) ;
103101 expect ( client . mongoLogger ) . to . not . exist ;
104102 } ) ;
@@ -111,7 +109,7 @@ describe('Feature Flags', () => {
111109
112110 it ( 'does not instantiate logger' , ( ) => {
113111 const client = new MongoClient ( 'mongodb://localhost:27017' , {
114- [ loggerFeatureFlag ] : featureFlagValue
112+ __enableMongoLogger : featureFlagValue
115113 } ) ;
116114 expect ( client . mongoLogger ) . to . not . exist ;
117115 } ) ;
@@ -120,7 +118,7 @@ describe('Feature Flags', () => {
120118 }
121119 } ) ;
122120
123- describe ( '@@mdb.internalLoggerConfig ' , ( ) => {
121+ describe ( '__internalLoggerConfig ' , ( ) => {
124122 let cachedEnv : NodeJS . ProcessEnv ;
125123
126124 before ( ( ) => {
@@ -138,8 +136,8 @@ describe('Feature Flags', () => {
138136
139137 it ( 'falls back to environment options' , function ( ) {
140138 const client = new MongoClient ( 'mongodb://localhost:27017' , {
141- [ __enableMongoLogger ] : true ,
142- [ __internalLoggerConfig ] : undefined
139+ __enableMongoLogger : true ,
140+ __internalLoggerConfig : undefined
143141 } ) ;
144142
145143 expect ( client . mongoLogger ?. componentSeverities ) . to . have . property (
@@ -152,8 +150,8 @@ describe('Feature Flags', () => {
152150 context ( 'when defined' , function ( ) {
153151 it ( 'overrides environment options' , function ( ) {
154152 const client = new MongoClient ( 'mongodb://localhost:27017' , {
155- [ __enableMongoLogger ] : true ,
156- [ __internalLoggerConfig ] : {
153+ __enableMongoLogger : true ,
154+ __internalLoggerConfig : {
157155 MONGODB_LOG_COMMAND : SeverityLevel . ALERT
158156 }
159157 } ) ;
0 commit comments