In dealing with this question, I printed out the properties of the testClient.s.options object.
I was surprised to find authsource and replicaset listed twice.
How did you manage to create two properties with the same name?
Is this a bug in your driver software?
This does not affect answering the question since both properties have the same value. Here is the result of listing Object.getOwnPropertyNames(clientOptions)
[ 'servers', 'ssl', 'authsource', 'replicaset', 'authSource', 'replicaSet', 'username', 'password', 'db', 'auth', 'user', 'dbName', 'connectTimeoutMS', 'retryWrites', 'useNewUrlParser', 'socketTimeoutMS', 'promiseLibrary' ]