mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 21:31:36 +02:00
* [web] provide an actual rootFolder from EditorProviders in tests - Fixup SocketIOMock and ShareJS mocks to provide the complete interface - Extend SocketIOMock interface to count event listeners - Fixup test that did not expect to find a working rootDoc * [web] expose imageName from ProjectContext * [clsi-cache] check compiler settings before using compile from cache * [web] avoid fetching initial compile from clsi-cache in PDF detach tab GitOrigin-RevId: e3c754a7ceca55f03a317e1bc8ae45ed12cc2f02
25 lines
498 B
TypeScript
25 lines
498 B
TypeScript
import { EditorView } from '@codemirror/view'
|
|
|
|
export const mockScope = () => ({
|
|
settings: {
|
|
syntaxValidation: false,
|
|
pdfViewer: 'pdfjs',
|
|
},
|
|
editor: {
|
|
open_doc_name: 'main.tex',
|
|
sharejs_doc: {
|
|
doc_id: 'test-doc',
|
|
getSnapshot: () => 'some doc content',
|
|
hasBufferedOps: () => false,
|
|
},
|
|
view: new EditorView({
|
|
doc: '\\documentclass{article}',
|
|
}),
|
|
},
|
|
hasLintingError: false,
|
|
ui: {
|
|
view: 'editor',
|
|
pdfLayout: 'sideBySide',
|
|
},
|
|
})
|