diff --git a/test/connection.test.js b/test/connection.test.js index 36290280b47..111432160a6 100644 --- a/test/connection.test.js +++ b/test/connection.test.js @@ -1542,7 +1542,7 @@ describe('connections:', function() { it('should not throw an error when attempting to mutate unmutable options object gh-13335', async function() { const m = new mongoose.Mongoose(); const opts = Object.preventExtensions({}); - const conn = await m.connect('mongodb://127.0.0.1:27017/db?retryWrites=true&w=majority&readPreference=secondaryPreferred', opts); + const conn = await m.connect('mongodb://127.0.0.1:27017/db?retryWrites=true&w=majority&readPreference=primaryPreferred', opts); assert.ok(conn); }); });