Skip to content

Commit e8936b7

Browse files
test: remove async hook import from signer spec
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent c9764cf commit e8936b7

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/tests/components/Signers/Signer.spec.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
import { beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'
6+
import { beforeEach, describe, expect, it, vi } from 'vitest'
77
import { createL10nMock } from '../../testHelpers/l10n.js'
88
import type { MockedFunction } from 'vitest'
99
import { mount } from '@vue/test-utils'
1010
import type { VueWrapper } from '@vue/test-utils'
1111
import { createPinia, setActivePinia } from 'pinia'
1212
import { mdiCheckCircle, mdiClockOutline, mdiCircleOutline } from '@mdi/js'
1313
import type { TranslationFunction, PluralTranslationFunction } from '../../test-types'
14+
import Signer from '../../../components/Signers/Signer.vue'
1415
import { useFilesStore } from '../../../store/files.js'
1516

16-
type SignerComponent = typeof import('../../../components/Signers/Signer.vue').default
17-
1817
type FileSigner = {
1918
signed?: boolean
2019
identifyMethods?: Array<{ method: string }>
@@ -67,8 +66,6 @@ const { t, n } = vi.hoisted(() => {
6766
return { t, n }
6867
})
6968

70-
let Signer: SignerComponent
71-
7269
vi.mock('@nextcloud/initial-state', () => ({
7370
loadState: vi.fn((app, key, defaultValue) => {
7471
if (key === 'can_request_sign') return true
@@ -89,10 +86,6 @@ vi.mock('@nextcloud/l10n', () => createL10nMock())
8986

9087
import { emit } from '@nextcloud/event-bus'
9188

92-
beforeAll(async () => {
93-
;({ default: Signer } = await import('../../../components/Signers/Signer.vue'))
94-
})
95-
9689
describe('Signer', () => {
9790
let wrapper: SignerWrapper | null
9891
let filesStore: FilesStoreMock

0 commit comments

Comments
 (0)