Skip to content

Commit c9764cf

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

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/tests/components/LeftSidebar/LeftSidebar.spec.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
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 { mount } from '@vue/test-utils'
9+
import LeftSidebar from '../../../components/LeftSidebar/LeftSidebar.vue'
910

1011
const loadStateMock = vi.fn()
1112
const getCurrentUserMock = vi.fn()
@@ -27,12 +28,6 @@ vi.mock('../../../store/files.js', () => ({
2728
}),
2829
}))
2930

30-
let LeftSidebar: unknown
31-
32-
beforeAll(async () => {
33-
;({ default: LeftSidebar } = await import('../../../components/LeftSidebar/LeftSidebar.vue'))
34-
})
35-
3631
describe('LeftSidebar', () => {
3732
beforeEach(() => {
3833
loadStateMock.mockReset()
@@ -53,7 +48,7 @@ describe('LeftSidebar', () => {
5348
})
5449
getCurrentUserMock.mockReturnValue({ isAdmin: true })
5550

56-
const wrapper = mount(LeftSidebar as never, {
51+
const wrapper = mount(LeftSidebar, {
5752
global: {
5853
stubs: {
5954
NcAppNavigation: {

0 commit comments

Comments
 (0)