Skip to content

Commit 123d20c

Browse files
committed
add type
1 parent 89f4a59 commit 123d20c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {beforeEach, describe, expect, test, vi} from 'vitest';
22
import {initRepoSettingsBranchesDrag} from './repo-settings-branches.ts';
33
import {POST} from '../modules/fetch.ts';
44
import {createSortable} from '../modules/sortable.ts';
5-
import type {SortableEvent} from 'sortablejs';
5+
import type {SortableEvent, SortableOptions} from 'sortablejs';
66
import type Sortable from 'sortablejs';
77

88
vi.mock('../modules/fetch.ts', () => ({
@@ -56,7 +56,7 @@ describe('Repository Branch Settings', () => {
5656
vi.mocked(POST).mockResolvedValue({ok: true} as Response);
5757

5858
// Mock createSortable to capture and execute the onEnd callback
59-
vi.mocked(createSortable).mockImplementation(async (_el: Element, options) => {
59+
vi.mocked(createSortable).mockImplementation(async (_el: Element, options: SortableOptions) => {
6060
options.onEnd(new Event('SortableEvent') as SortableEvent);
6161
// @ts-expect-error: mock is incomplete
6262
return {destroy: vi.fn()} as Sortable;

0 commit comments

Comments
 (0)