summaryrefslogtreecommitdiffhomepage
path: root/packages/tool-youtube-transcript/src/validate.test.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-27 01:09:39 +0900
committerAdam Malczewski <[email protected]>2026-06-27 01:09:39 +0900
commit61e45e60d699ed1ca46f94a8f181c92a940317c6 (patch)
tree2892d9773c5a8e367e1e58cdb1e88d9c6ad3fe6d /packages/tool-youtube-transcript/src/validate.test.ts
parent63c7e64532e85e0bbdd6d9ac6825d8f86be98e7a (diff)
parent727c98c9dae516a2070eb950410314380a20c974 (diff)
downloaddispatch-61e45e60d699ed1ca46f94a8f181c92a940317c6.tar.gz
dispatch-61e45e60d699ed1ca46f94a8f181c92a940317c6.zip
Merge branch 'feature/indent-change' into dev
Diffstat (limited to 'packages/tool-youtube-transcript/src/validate.test.ts')
-rw-r--r--packages/tool-youtube-transcript/src/validate.test.ts54
1 files changed, 27 insertions, 27 deletions
diff --git a/packages/tool-youtube-transcript/src/validate.test.ts b/packages/tool-youtube-transcript/src/validate.test.ts
index 3181bb1..7bd70d9 100644
--- a/packages/tool-youtube-transcript/src/validate.test.ts
+++ b/packages/tool-youtube-transcript/src/validate.test.ts
@@ -2,34 +2,34 @@ import { describe, expect, it } from "vitest";
import { validateUrl } from "./validate.js";
describe("validateUrl", () => {
- it("accepts valid URL", () => {
- const result = validateUrl({ url: "https://www.youtube.com/watch?v=abc123" });
- expect(result).toBe("https://www.youtube.com/watch?v=abc123");
- });
+ it("accepts valid URL", () => {
+ const result = validateUrl({ url: "https://www.youtube.com/watch?v=abc123" });
+ expect(result).toBe("https://www.youtube.com/watch?v=abc123");
+ });
- it("rejects missing url", () => {
- const result = validateUrl({ query: "no url here" });
- expect(typeof result).toBe("object");
- if (typeof result === "object") {
- expect(result.error).toContain("url");
- }
- });
+ it("rejects missing url", () => {
+ const result = validateUrl({ query: "no url here" });
+ expect(typeof result).toBe("object");
+ if (typeof result === "object") {
+ expect(result.error).toContain("url");
+ }
+ });
- it("rejects empty url", () => {
- const empty = validateUrl({ url: "" });
- expect(typeof empty).toBe("object");
- if (typeof empty === "object") {
- expect(empty.error).toContain("url");
- }
- const whitespace = validateUrl({ url: " " });
- expect(typeof whitespace).toBe("object");
- });
+ it("rejects empty url", () => {
+ const empty = validateUrl({ url: "" });
+ expect(typeof empty).toBe("object");
+ if (typeof empty === "object") {
+ expect(empty.error).toContain("url");
+ }
+ const whitespace = validateUrl({ url: " " });
+ expect(typeof whitespace).toBe("object");
+ });
- it("rejects null/non-object args", () => {
- expect(typeof validateUrl(null)).toBe("object");
- expect(typeof validateUrl(undefined)).toBe("object");
- expect(typeof validateUrl("string")).toBe("object");
- expect(typeof validateUrl(42)).toBe("object");
- expect(typeof validateUrl(true)).toBe("object");
- });
+ it("rejects null/non-object args", () => {
+ expect(typeof validateUrl(null)).toBe("object");
+ expect(typeof validateUrl(undefined)).toBe("object");
+ expect(typeof validateUrl("string")).toBe("object");
+ expect(typeof validateUrl(42)).toBe("object");
+ expect(typeof validateUrl(true)).toBe("object");
+ });
});