mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
e832c9ed70
GitOrigin-RevId: dd9ab4bb12e8b9071b2a869e2d452945b49d9cd7
32 lines
667 B
JavaScript
32 lines
667 B
JavaScript
import sinon from 'sinon'
|
|
|
|
export function setupContext() {
|
|
window.project_id = '1234'
|
|
window.user = {
|
|
id: 'fake_user',
|
|
allowedFreeTrial: true,
|
|
}
|
|
let $scope = {}
|
|
if (window._ide) {
|
|
$scope = {
|
|
...window._ide.$scope,
|
|
project: {},
|
|
$watch: () => {},
|
|
ui: {
|
|
chatOpen: true,
|
|
pdfLayout: 'flat',
|
|
},
|
|
}
|
|
}
|
|
window._ide = {
|
|
...window._ide,
|
|
$scope,
|
|
socket: {
|
|
on: sinon.stub(),
|
|
removeListener: sinon.stub(),
|
|
},
|
|
}
|
|
window.ExposedSettings = window.ExposedSettings || {}
|
|
window.ExposedSettings.appName = 'Overleaf'
|
|
window.gitBridgePublicBaseUrl = 'https://git.stories.com'
|
|
}
|