summaryrefslogtreecommitdiffhomepage
path: root/packages/tool-youtube-transcript/src/validate.test.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-26 22:03:19 +0900
committerAdam Malczewski <[email protected]>2026-06-26 22:23:39 +0900
commit727c98c9dae516a2070eb950410314380a20c974 (patch)
tree52aa1022c54f11770be7e4e2a324f0a8b8b8deec /packages/tool-youtube-transcript/src/validate.test.ts
parente59dc11f63b1df51142259bb2c406af8c9c8c2bb (diff)
downloaddispatch-727c98c9dae516a2070eb950410314380a20c974.tar.gz
dispatch-727c98c9dae516a2070eb950410314380a20c974.zip
style: switch from tabs to 2-space indentation
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");
+ });
});