aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/actions/openFolderAction.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/src/actions/openFolderAction.spec.ts')
-rw-r--r--apps/files/src/actions/openFolderAction.spec.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files/src/actions/openFolderAction.spec.ts b/apps/files/src/actions/openFolderAction.spec.ts
index cbbbe38f15e..066ad5d86d8 100644
--- a/apps/files/src/actions/openFolderAction.spec.ts
+++ b/apps/files/src/actions/openFolderAction.spec.ts
@@ -2,8 +2,8 @@
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-import { expect } from '@jest/globals'
import { File, Folder, Node, Permission, View, DefaultType, FileAction } from '@nextcloud/files'
+import { describe, expect, test, vi } from 'vitest'
import { action } from './openFolderAction'
@@ -24,7 +24,7 @@ describe('Open folder action conditions tests', () => {
expect(action).toBeInstanceOf(FileAction)
expect(action.id).toBe('open-folder')
expect(action.displayName([folder], view)).toBe('Open folder FooBar')
- expect(action.iconSvgInline([], view)).toBe('<svg>SvgMock</svg>')
+ expect(action.iconSvgInline([], view)).toMatch(/<svg.+<\/svg>/)
expect(action.default).toBe(DefaultType.HIDDEN)
expect(action.order).toBe(-100)
})
@@ -100,7 +100,7 @@ describe('Open folder action enabled tests', () => {
describe('Open folder action execute tests', () => {
test('Open folder', 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 } } }
@@ -119,7 +119,7 @@ describe('Open folder action execute tests', () => {
})
test('Open folder fails without node', 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 } } }
@@ -129,7 +129,7 @@ describe('Open folder action execute tests', () => {
})
test('Open folder fails without Folder', 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 } } }