mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-08-01 14:00:23 +02:00

* Move `hasLintingError` from scope to react state * Move `permissionsLevel` to IdeReactContext states * Get `permissionsLevel` from `useIdeReactContext()` * Set `permissionsLevel` in mocked `IdeReactProvider` * Replace `permissions` scope by React state * Fixup `permission` changes * Remove redundant type GitOrigin-RevId: 6203c61f9ac429789624196bf67e508310f4577f
18 lines
379 B
TypeScript
18 lines
379 B
TypeScript
import { EditorView } from '@codemirror/view'
|
|
|
|
export const mockScope = () => ({
|
|
settings: {
|
|
syntaxValidation: false,
|
|
pdfViewer: 'pdfjs',
|
|
},
|
|
editor: {
|
|
sharejs_doc: {
|
|
doc_id: 'test-doc',
|
|
getSnapshot: () => 'some doc content',
|
|
hasBufferedOps: () => false,
|
|
},
|
|
view: new EditorView({
|
|
doc: '\\documentclass{article}',
|
|
}),
|
|
},
|
|
})
|