|
3 | 3 | * SPDX-License-Identifier: AGPL-3.0-or-later |
4 | 4 | */ |
5 | 5 |
|
6 | | -import type { IFileAction } from '../../lib/actions/index.ts' |
7 | | -import type { View } from '../../lib/navigation/view.ts' |
8 | | -import type { Folder, Node } from '../../lib/node/index.ts' |
| 6 | +import type { IFolder, INode } from '~/node/index.ts' |
| 7 | +import type { IFileAction } from '~/ui/index.ts' |
| 8 | +import type { View } from '~/ui/navigation/index.ts' |
9 | 9 |
|
10 | 10 | import { beforeEach, describe, expect, test, vi } from 'vitest' |
11 | | -import { DefaultType, getFileActions, registerFileAction } from '../../lib/actions/index.ts' |
12 | | -import { scopedGlobals } from '../../lib/globalScope.ts' |
13 | | -import { getRegistry } from '../../lib/registry.ts' |
14 | | -import logger from '../../lib/utils/logger.ts' |
| 11 | +import { scopedGlobals } from '~/globalScope.ts' |
| 12 | +import { DefaultType, getFileActions, getFilesRegistry, registerFileAction } from '~/ui/index.ts' |
| 13 | +import logger from '~/utils/logger.ts' |
15 | 14 |
|
16 | | -const folder = {} as Folder |
| 15 | +const folder = {} as IFolder |
17 | 16 | const view = {} as View |
18 | 17 | describe('FileActions init', () => { |
19 | 18 | beforeEach(() => { |
@@ -54,7 +53,7 @@ describe('FileActions init', () => { |
54 | 53 | exec: async () => true, |
55 | 54 | } |
56 | 55 |
|
57 | | - getRegistry().addEventListener('register:action', callback) |
| 56 | + getFilesRegistry().addEventListener('register:action', callback) |
58 | 57 | registerFileAction(action) |
59 | 58 |
|
60 | 59 | expect(callback).toHaveBeenCalled() |
@@ -248,7 +247,7 @@ describe('FileActions creation', () => { |
248 | 247 | }, |
249 | 248 | } |
250 | 249 |
|
251 | | - const node = {} as Node |
| 250 | + const node = {} as INode |
252 | 251 |
|
253 | 252 | expect(action.id).toBe('test') |
254 | 253 | expect(action.displayName({ view, folder, nodes: [], contents: [] })).toBe('Test') |
|
0 commit comments