Skip to content

Commit 0e665a6

Browse files
committed
fix(test): use async import in vi.mock factory to fix vitest hoisting error
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent e28a0c6 commit 0e665a6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/tests/views/Settings/PolicyWorkbench/RequestSignGroupsRuleEditor.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import { describe, expect, it, vi } from 'vitest'
88

99
import { createL10nMock } from '../../../testHelpers/l10n.js'
1010

11-
vi.mock('@nextcloud/l10n', () => createL10nMock())
11+
vi.mock('@nextcloud/l10n', async () => {
12+
const { createL10nMock } = await import('../../../testHelpers/l10n.js')
13+
return createL10nMock()
14+
})
1215

1316
const { currentUserState, initialConfigState, axiosGet } = vi.hoisted(() => ({
1417
currentUserState: {

0 commit comments

Comments
 (0)