Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 98 additions & 69 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"@types/jsdom": "^30.0.0",
"@types/markdown-it-footnote": "^3.0.4",
"@vitejs/plugin-vue": "^6.0.10",
"@vitest/coverage-v8": "^5.0.3",
"@vitest/coverage-v8": "^5.0.4",
"@vue/test-utils": "^2.5.1",
"@vue/tsconfig": "^0.9.1",
"@vueuse/core": "^15.0.0",
Expand All @@ -135,7 +135,7 @@
"typescript": "^6.0.3",
"vite": "^7.3.7",
"vite-plugin-commonjs": "^0.10.4",
"vitest": "^5.0.3",
"vitest": "^5.0.4",
"vue-tsc": "^3.3.13"
},
"optionalDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions src/tests/comparison/decorations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterAll, afterEach, beforeEach, describe, expect, it } from 'vitest'
import { compareDocuments } from '../../comparison/compare.ts'
import { createComparisonDecorationPlugin, createComparisonSpacerPlugin, setComparisonDecorations, setComparisonSpacers } from '../../comparison/decorations.ts'
import { createComparisonEditor } from '../../comparison/editor.ts'
Expand All @@ -15,17 +15,18 @@ const beforePlugin = createComparisonDecorationPlugin('before')
const afterPlugin = createComparisonDecorationPlugin('after')

beforeEach(() => {
before.mount(document.createElement('div'))
after.mount(document.createElement('div'))
before.registerPlugin(beforePlugin.plugin)
after.registerPlugin(afterPlugin.plugin)
})

afterEach(() => {
before.unregisterPlugin(beforePlugin.key)
after.unregisterPlugin(afterPlugin.key)
before.unmount()
after.unmount()
})

afterAll(() => {
before.destroy()
after.destroy()
})

function marked(editor: typeof before) {
Expand Down Expand Up @@ -61,7 +62,6 @@ describe('comparison spacers', () => {
it('sets the top margin of a block instead of adding an element', () => {
const editor = createComparisonEditor('First\n\n## Second')
const spacers = createComparisonSpacerPlugin()
editor.mount(document.createElement('div'))
editor.registerPlugin(spacers.plugin)
const blocks = () => [...editor.view.dom.children] as HTMLElement[]
const count = blocks().length
Expand Down
Loading