overleaf/services/real-time/test/unit/coffee/helpers/MockClient.coffee

13 lines
254 B
CoffeeScript

sinon = require('sinon')
idCounter = 0
module.exports = class MockClient
constructor: () ->
@ol_context = {}
@join = sinon.stub()
@emit = sinon.stub()
@disconnect = sinon.stub()
@id = idCounter++
@publicId = idCounter++
disconnect: () ->