diff --git a/src/core/scheduler.ts b/src/core/scheduler.ts index 91f0b864..237cbb12 100644 --- a/src/core/scheduler.ts +++ b/src/core/scheduler.ts @@ -315,7 +315,13 @@ export class Scheduler extends EventEmitter { } private canWatch() { - if (this.connection.redis?.constructor?.name === "RedisMock") return false; + if ( + ["RedisMock", "_RedisMock"].includes( + this.connection.redis?.constructor?.name, + ) + ) { + return false; + } if (typeof this.connection.redis.unwatch !== "function") return false; return true; }