Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(eslint): Backport some changes from master to fix eslint
Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
CarlSchwan authored and nextcloud-command committed Sep 20, 2025
commit 38c7d72f9a6c2614db30c05c6d96570022bf752d
7 changes: 7 additions & 0 deletions apps/files/src/composables/useNavigation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('Composables: useNavigation', () => {

describe('currentView', () => {
beforeEach(() => {
// eslint-disable-next-line import/namespace
navigation = new nextcloudFiles.Navigation()
spy.mockImplementation(() => navigation)
})
Expand All @@ -39,6 +40,7 @@ describe('Composables: useNavigation', () => {
})

it('should return already active navigation', async () => {
// eslint-disable-next-line import/namespace
const view = new nextcloudFiles.View({ getContents: () => Promise.reject(new Error()), icon: '<svg></svg>', id: 'view-1', name: 'My View 1', order: 0 })
navigation.register(view)
navigation.setActive(view)
Expand All @@ -48,6 +50,7 @@ describe('Composables: useNavigation', () => {
})

it('should be reactive on updating active navigation', async () => {
// eslint-disable-next-line import/namespace
const view = new nextcloudFiles.View({ getContents: () => Promise.reject(new Error()), icon: '<svg></svg>', id: 'view-1', name: 'My View 1', order: 0 })
navigation.register(view)
const wrapper = mount(TestComponent)
Expand All @@ -63,6 +66,7 @@ describe('Composables: useNavigation', () => {

describe('views', () => {
beforeEach(() => {
// eslint-disable-next-line import/namespace
navigation = new nextcloudFiles.Navigation()
spy.mockImplementation(() => navigation)
})
Expand All @@ -73,6 +77,7 @@ describe('Composables: useNavigation', () => {
})

it('should return already registered views', () => {
// eslint-disable-next-line import/namespace
const view = new nextcloudFiles.View({ getContents: () => Promise.reject(new Error()), icon: '<svg></svg>', id: 'view-1', name: 'My View 1', order: 0 })
// register before mount
navigation.register(view)
Expand All @@ -82,7 +87,9 @@ describe('Composables: useNavigation', () => {
})

it('should be reactive on registering new views', () => {
// eslint-disable-next-line import/namespace
const view = new nextcloudFiles.View({ getContents: () => Promise.reject(new Error()), icon: '<svg></svg>', id: 'view-1', name: 'My View 1', order: 0 })
// eslint-disable-next-line import/namespace
const view2 = new nextcloudFiles.View({ getContents: () => Promise.reject(new Error()), icon: '<svg></svg>', id: 'view-2', name: 'My View 2', order: 1 })

// register before mount
Expand Down
1 change: 1 addition & 0 deletions apps/files/src/views/favorites.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { action } from '../actions/favoriteAction'
import * as favoritesService from '../services/Favorites'
import { registerFavoritesView } from './favorites'

// eslint-disable-next-line import/namespace
const { Folder, getNavigation } = filesUtils

vi.mock('@nextcloud/axios')
Expand Down