Skip to content

Commit 89c8af6

Browse files
committed
fix(MongoMemoryReplSet): change "_waitForPrimary" timout message to be an error
1 parent 7107c59 commit 89c8af6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mongodb-memory-server-core/src/MongoMemoryReplSet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ export class MongoMemoryReplSet extends EventEmitter {
468468
),
469469
new Promise((res, rej) => {
470470
timeoutId = setTimeout(() => {
471-
rej(`Timed out after ${timeout}ms while waiting for an Primary`);
471+
rej(new Error(`Timed out after ${timeout}ms while waiting for an Primary`));
472472
}, timeout);
473473
}),
474474
]);

0 commit comments

Comments
 (0)