overleaf/services/web/frontend/stories/fixtures/context.js
Miguel Serrano 445c850004 Revert "React Git Bridge Modal (#3757)" (#3867)
This reverts commit cf883b776a9ddc7975977534dc453ece4b3ec431.

GitOrigin-RevId: 462d7282d2c706ef5395c25a335239bfac4787a6
2021-04-01 02:05:27 +00:00

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()
}
}
}