Skip to content

Commit 89f4a59

Browse files
committed
fix tsc
1 parent f973708 commit 89f4a59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web_src/js/features/repo-settings-branches.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {initRepoSettingsBranchesDrag} from './repo-settings-branches.ts';
33
import {POST} from '../modules/fetch.ts';
44
import {createSortable} from '../modules/sortable.ts';
55
import type {SortableEvent} from 'sortablejs';
6+
import type Sortable from 'sortablejs';
67

78
vi.mock('../modules/fetch.ts', () => ({
89
POST: vi.fn(),
@@ -57,7 +58,8 @@ describe('Repository Branch Settings', () => {
5758
// Mock createSortable to capture and execute the onEnd callback
5859
vi.mocked(createSortable).mockImplementation(async (_el: Element, options) => {
5960
options.onEnd(new Event('SortableEvent') as SortableEvent);
60-
return {destroy: vi.fn()};
61+
// @ts-expect-error: mock is incomplete
62+
return {destroy: vi.fn()} as Sortable;
6163
});
6264

6365
initRepoSettingsBranchesDrag();

0 commit comments

Comments
 (0)