test: work around mocking issue
This commit is contained in:
parent
3d696646c5
commit
5870e8d6e6
|
@ -1,4 +1,5 @@
|
||||||
import { describe, expect, it, vi } from 'vitest'
|
// TODO: fix shadowing of `vi` import
|
||||||
|
import { vi as _vi, describe, expect, it } from 'vitest'
|
||||||
import { renderToString } from 'vue/server-renderer'
|
import { renderToString } from 'vue/server-renderer'
|
||||||
import { format } from 'prettier'
|
import { format } from 'prettier'
|
||||||
import type { mastodon } from 'masto'
|
import type { mastodon } from 'masto'
|
||||||
|
@ -270,7 +271,7 @@ async function render(content: string, options?: ContentParseOptions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// mocks
|
// mocks
|
||||||
vi.mock('vue-router', async () => {
|
_vi.mock('vue-router', async () => {
|
||||||
const { defineComponent, h } = await import('vue')
|
const { defineComponent, h } = await import('vue')
|
||||||
return {
|
return {
|
||||||
RouterLink: defineComponent((attrs) => {
|
RouterLink: defineComponent((attrs) => {
|
||||||
|
@ -279,7 +280,7 @@ vi.mock('vue-router', async () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
vi.mock('shiki-es', async (importOriginal) => {
|
_vi.mock('shiki-es', async (importOriginal) => {
|
||||||
const mod = await importOriginal()
|
const mod = await importOriginal()
|
||||||
return {
|
return {
|
||||||
...(mod as any),
|
...(mod as any),
|
||||||
|
|
Loading…
Reference in a new issue