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'
77import { createL10nMock } from '../../testHelpers/l10n.js'
88import type { MockedFunction } from 'vitest'
99import { mount } from '@vue/test-utils'
1010import type { VueWrapper } from '@vue/test-utils'
1111import { createPinia , setActivePinia } from 'pinia'
1212import { mdiCheckCircle , mdiClockOutline , mdiCircleOutline } from '@mdi/js'
1313import type { TranslationFunction , PluralTranslationFunction } from '../../test-types'
14+ import Signer from '../../../components/Signers/Signer.vue'
1415import { useFilesStore } from '../../../store/files.js'
1516
16- type SignerComponent = typeof import ( '../../../components/Signers/Signer.vue' ) . default
17-
1817type 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-
7269vi . 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
9087import { emit } from '@nextcloud/event-bus'
9188
92- beforeAll ( async ( ) => {
93- ; ( { default : Signer } = await import ( '../../../components/Signers/Signer.vue' ) )
94- } )
95-
9689describe ( 'Signer' , ( ) => {
9790 let wrapper : SignerWrapper | null
9891 let filesStore : FilesStoreMock
0 commit comments