Skip to content

Commit c7a52ac

Browse files
committed
test(left-sidebar): fix hoisted l10n mock
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> (cherry picked from commit bd60d83) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent b6e4b62 commit c7a52ac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tests/components/LeftSidebar/LeftSidebar.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55

66
import { beforeEach, describe, expect, it, vi } from 'vitest'
7-
import { createL10nMock } from '../../testHelpers/l10n.js'
87
import { mount } from '@vue/test-utils'
98
import LeftSidebar from '../../../components/LeftSidebar/LeftSidebar.vue'
109

@@ -20,7 +19,10 @@ vi.mock('@nextcloud/auth', () => ({
2019
getCurrentUser: () => getCurrentUserMock(),
2120
}))
2221

23-
vi.mock('@nextcloud/l10n', () => createL10nMock())
22+
vi.mock('@nextcloud/l10n', async () => {
23+
const { createL10nMock } = await import('../../testHelpers/l10n.js')
24+
return createL10nMock()
25+
})
2426

2527
vi.mock('../../../store/files.js', () => ({
2628
useFilesStore: () => ({

0 commit comments

Comments
 (0)