mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 21:22:13 +00: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()
|
|
}
|
|
}
|
|
}
|