mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
da641ba039
Chat test cleanup GitOrigin-RevId: 4323d93f64f0e51efd2931acbc77fc9b43a216cd
20 lines
361 B
JavaScript
20 lines
361 B
JavaScript
import sinon from 'sinon'
|
|
|
|
export function setupContext() {
|
|
window.project_id = '1234'
|
|
window.user = {
|
|
id: 'fake_user'
|
|
}
|
|
let $scope = {}
|
|
if (window._ide) {
|
|
$scope = { ...window._ide.$scope, project: {} }
|
|
}
|
|
window._ide = {
|
|
...window._ide,
|
|
$scope,
|
|
socket: {
|
|
on: sinon.stub(),
|
|
removeListener: sinon.stub()
|
|
}
|
|
}
|
|
}
|