Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const decorateBulkWriteResult = require('./helpers/model/decorateBulkWriteResult
const arrayAtomicsSymbol = require('./helpers/symbols').arrayAtomicsSymbol;
const sessionNewDocuments = require('./helpers/symbols').sessionNewDocuments;

// Snapshot the native Date constructor to ensure both Date.now() and new Date() (and other Date methods)
// bypass timer mocks such as those set up by useFakeTimers().
const Date = globalThis.Date;

/**
* A list of authentication mechanisms that don't require a password for authentication.
* This is used by the authMechanismDoesNotRequirePassword method.
Expand Down