refactor(web): dependency management (#2386)

This commit is contained in:
Mo
2023-08-05 12:48:39 -05:00
committed by GitHub
parent b07da5b663
commit d8d4052a52
274 changed files with 4065 additions and 3873 deletions

View File

@@ -3,7 +3,6 @@
*/
import { WebApplication } from '@/Application/WebApplication'
import { ViewControllerManager } from '@/Controllers/ViewControllerManager'
import { NotesController } from '@/Controllers/NotesController/NotesController'
import {
ApplicationEvent,
@@ -18,7 +17,7 @@ import { NoteViewController } from './Controller/NoteViewController'
describe('NoteView', () => {
let noteViewController: NoteViewController
let application: WebApplication
let viewControllerManager: ViewControllerManager
let notesController: NotesController
const createNoteView = () =>
@@ -37,13 +36,11 @@ describe('NoteView', () => {
notesController.getSpellcheckStateForNote = jest.fn()
notesController.getEditorWidthForNote = jest.fn()
viewControllerManager = {
notesController: notesController,
} as jest.Mocked<ViewControllerManager>
application = {
controllers: viewControllerManager,
} as jest.Mocked<WebApplication>
notesController,
noteViewController,
} as unknown as jest.Mocked<WebApplication>
application.hasProtectionSources = jest.fn().mockReturnValue(true)
application.authorizeNoteAccess = jest.fn()
application.addWebEventObserver = jest.fn()