Stop attempt at bundling ioredis-mock, only need to check at runtime.

This commit is contained in:
mike12345567 2023-06-02 13:59:33 +01:00
parent fcbf143df4
commit c13530ef32
1 changed files with 6 additions and 2 deletions

View File

@ -3,8 +3,12 @@ import Redis from "ioredis"
// mock-redis doesn't have any typing
let MockRedis: any | undefined
if (env.MOCK_REDIS) {
// ioredis mock is all in memory
MockRedis = require("ioredis-mock")
try {
// ioredis mock is all in memory
MockRedis = require("ioredis-mock")
} catch (err) {
console.log("Mock redis unavailable")
}
}
import {
addDbPrefix,