diff --git a/test/connection.test.js b/test/connection.test.js index 49f715a8f4a..36290280b47 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://localhost: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=secondaryPreferred', opts); assert.ok(conn); }); });