scope.tsx 379 B

123456789101112131415161718
  1. import { EditorView } from '@codemirror/view'
  2. export const mockScope = () => ({
  3. settings: {
  4. syntaxValidation: false,
  5. pdfViewer: 'pdfjs',
  6. },
  7. editor: {
  8. sharejs_doc: {
  9. doc_id: 'test-doc',
  10. getSnapshot: () => 'some doc content',
  11. hasBufferedOps: () => false,
  12. },
  13. view: new EditorView({
  14. doc: '\\documentclass{article}',
  15. }),
  16. },
  17. })