mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
445c850004
This reverts commit cf883b776a9ddc7975977534dc453ece4b3ec431. GitOrigin-RevId: 462d7282d2c706ef5395c25a335239bfac4787a6
27 lines
445 B
JavaScript
27 lines
445 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: {},
|
|
$watch: () => {},
|
|
ui: {
|
|
chatOpen: true
|
|
}
|
|
}
|
|
}
|
|
window._ide = {
|
|
...window._ide,
|
|
$scope,
|
|
socket: {
|
|
on: sinon.stub(),
|
|
removeListener: sinon.stub()
|
|
}
|
|
}
|
|
}
|