mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
18 lines
319 B
JavaScript
18 lines
319 B
JavaScript
|
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()
|
||
|
}
|
||
|
}
|
||
|
}
|