fix build problems

This commit is contained in:
Brian Gough 2019-07-09 12:20:59 +01:00
parent 580b100362
commit dd54789e2b
2 changed files with 5 additions and 5 deletions

View file

@ -1,7 +1,7 @@
redis = require("redis-sharelatex") redis = require("redis-sharelatex")
modules.export = RedisClientManager = module.exports = RedisClientManager =
createClientList: (configs...) createClientList: (configs...) ->
# create a dynamic list of redis clients, excluding any configurations which are not defined # create a dynamic list of redis clients, excluding any configurations which are not defined
clientList = (redis.createClient(x) for x in configs when x?)) clientList = (redis.createClient(x) for x in configs when x?)
return clientList return clientList

View file

@ -7,8 +7,8 @@ describe "WebsocketLoadBalancer", ->
beforeEach -> beforeEach ->
@rclient = {} @rclient = {}
@WebsocketLoadBalancer = SandboxedModule.require modulePath, requires: @WebsocketLoadBalancer = SandboxedModule.require modulePath, requires:
"redis-sharelatex": "./RedisClientManager":
createClient: () => @rclient createClientList: () => []
"logger-sharelatex": @logger = { log: sinon.stub(), error: sinon.stub() } "logger-sharelatex": @logger = { log: sinon.stub(), error: sinon.stub() }
"./SafeJsonParse": @SafeJsonParse = "./SafeJsonParse": @SafeJsonParse =
parse: (data, cb) => cb null, JSON.parse(data) parse: (data, cb) => cb null, JSON.parse(data)