overleaf/services/web/frontend/stories/fixtures/context.js

18 lines
319 B
JavaScript
Raw Normal View History

import sinon from 'sinon'
export function setupContext() {
window.project_id = '1234'
let $scope = {}
if (window._ide) {
$scope = { ...window._ide.$scope, project: {} }
}
window._ide = {
...window._ide,
$scope,
socket: {
on: sinon.stub(),
removeListener: sinon.stub()
}
}
}