Skip to content

Commit 35fbd70

Browse files
committed
fix: isolate index tests from subtitles module mock
1 parent 66afffc commit 35fbd70

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/index.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { describe, expect, it, mock } from "bun:test";
2+
import type { RawCaptionTrack } from "../src/innertube.ts";
23
import type { SubtitleTrack } from "../src/subtitles.ts";
34
import type { TokenResult } from "../src/token-service.ts";
45

@@ -12,8 +13,8 @@ mock.module("../src/token-service.ts", () => ({
1213
),
1314
}));
1415

15-
mock.module("../src/subtitles.ts", () => ({
16-
fetchSubtitles: mock(async (_videoId: string): Promise<SubtitleTrack[]> => []),
16+
mock.module("../src/innertube.ts", () => ({
17+
fetchCaptionTracks: mock(async (_videoId: string): Promise<RawCaptionTrack[]> => []),
1718
}));
1819

1920
describe("handler", () => {

0 commit comments

Comments
 (0)