diff --git a/packages/types/src/media-schemas.test.ts b/packages/types/src/media-schemas.test.ts index b721ced..39e2a1c 100644 --- a/packages/types/src/media-schemas.test.ts +++ b/packages/types/src/media-schemas.test.ts @@ -54,12 +54,9 @@ describe("danmakuSchemas.settings", () => { }); it("blockTypes 只接受 scroll|top|bottom", () => { expect( - danmakuSchemas.settings.safeParse({ blockTypes: ["scroll", "top", "bottom"] }) - .success, + danmakuSchemas.settings.safeParse({ blockTypes: ["scroll", "top", "bottom"] }).success, ).toBe(true); - expect(danmakuSchemas.settings.safeParse({ blockTypes: ["reverse"] }).success).toBe( - false, - ); + expect(danmakuSchemas.settings.safeParse({ blockTypes: ["reverse"] }).success).toBe(false); }); it("opacity 越界拒绝", () => { expect(danmakuSchemas.settings.safeParse({ opacity: 1.5 }).success).toBe(false); @@ -74,14 +71,11 @@ describe("danmakuSchemas.import", () => { expect(r.success).toBe(true); }); it("拒绝空 xml", () => { - expect(danmakuSchemas.import.safeParse({ mediaItemId: "m1", xml: "" }).success).toBe( - false, - ); + expect(danmakuSchemas.import.safeParse({ mediaItemId: "m1", xml: "" }).success).toBe(false); }); it("拒绝不含 { expect( - danmakuSchemas.import.safeParse({ mediaItemId: "m1", xml: "no" }) - .success, + danmakuSchemas.import.safeParse({ mediaItemId: "m1", xml: "no" }).success, ).toBe(false); }); it("拒绝超过 20MB 的 xml", () => {