diff options
Diffstat (limited to 'apps/files_external/src/actions/openInFilesAction.spec.ts')
-rw-r--r-- | apps/files_external/src/actions/openInFilesAction.spec.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_external/src/actions/openInFilesAction.spec.ts b/apps/files_external/src/actions/openInFilesAction.spec.ts index 83aa38f1753..aa9573eca77 100644 --- a/apps/files_external/src/actions/openInFilesAction.spec.ts +++ b/apps/files_external/src/actions/openInFilesAction.spec.ts @@ -2,10 +2,11 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ -import { action } from './openInFilesAction' -import { expect } from '@jest/globals' import { Folder, Permission, View, DefaultType, FileAction } from '@nextcloud/files' +import { describe, expect, test, vi } from 'vitest' + import type { StorageConfig } from '../services/externalStorage' +import { action } from './openInFilesAction' import { STORAGE_STATUS } from '../utils/credentialsUtils' const view = { @@ -73,7 +74,7 @@ describe('Open in files action enabled tests', () => { describe('Open in files action execute tests', () => { test('Open in files', async () => { - const goToRouteMock = jest.fn() + const goToRouteMock = vi.fn() // @ts-expect-error We only mock what needed, we do not need Files.Router.goTo or Files.Navigation window.OCP = { Files: { Router: { goToRoute: goToRouteMock } } } @@ -98,7 +99,7 @@ describe('Open in files action execute tests', () => { }) test('Open in files broken storage', async () => { - const confirmMock = jest.fn() + const confirmMock = vi.fn() // @ts-expect-error We only mock what is needed window.OC = { dialogs: { confirm: confirmMock } } |