mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-23 02:55:13 -04:00
f9962fefe8
GitOrigin-RevId: 5b2609ed9ad7909a10cb08342053e955447688f5
29 lines
577 B
JavaScript
29 lines
577 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()
|
|
}
|
|
}
|
|
window.ExposedSettings = window.ExposedSettings || {}
|
|
window.ExposedSettings.gitBridgePublicBaseUrl = 'https://git.stories.com'
|
|
}
|